Reputation: 4907
I'm working on a Chrome/Firefox extension which will be using the file API to store files locally. I'm trying to get an example up and running but I'm running into issues which seem to center around Chrome. Can anyone explain why this jsFiddle works fine, but the exact same code, when run from a local file, doesn't work. Please note that it works fine in Firefox, just not in Chrome. Any ideas?
Upvotes: 3
Views: 837
Reputation: 9586
If you are using chrome. Start the chrome from command line with the flag --allow-file-access-from-files chrome doesn't support for accessing local file without this flag.
Upvotes: 0
Reputation: 224859
Chrome has unusually restrictive web security; many things, like Ajax, won't work when run locally. This is one of them. You can get around this problem by either using a local websever, like @ephemient suggests, or you can run Chrome in unsafe mode for testing:
chrome.exe --disable-web-security
Upvotes: 1