SyntaxScrewer's Blog

March 16, 2012

Javascript : Unable to load up image files locally – Firefox / Chrome

Filed under: Browsers,Javascript — geekymaira @ 1:39 pm

Hello!

So I found out that for some reason Firefox / Chrome do not allow Javascript to load up local files from the disk.
This is some sort of security restriction.  Maybe its the same with Safari but I haven’t found out a solution for that yet.

Solution (Chrome)  :  For local files to work on Chrome, it has to be started with--allow-file-access-from-files command line flag.
Solution (Firefox)   : For Firefox, there is a similar parameter security.fileuri.strict_origin_policy accessible via about:config.

reference : https://github.com/mrdoob/three.js/issues/343

Hope this helps!

Cheers

SyntaxScrewer

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: