SyntaxScrewer's Blog

March 16, 2012

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

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


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 :

Hope this helps!




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: Logo

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

Create a free website or blog at

%d bloggers like this: