Jump to content

Google Chrome and File Reading with jQuery AJAX

Recommended Posts

Since some webpages of W3Schools discuss which browsers (e.g. Google Chrome, Internet Explorer) support certain features, I think that W3Schools should note in its jQuery AJAX tutorials that Google Chrome cannot be used to import files (e.g. .html files) from one's own hard drive, whereas Internet Explorer and Mozilla Firefox can. This would have saved me much time that I spent finding out the hard way, and based on other online forums, other people seem to be confused by Google Chrome's incompatibility and do not know the reason.

Share this post

Link to post
Share on other sites

jQuery or not, AJAX isn't really designed to load files locally from the computer because it's HTTP based. Web development tutorials assume that your page is being accessed through HTTP.


Being able to open local files in Firefox is more of a bonus, rather than the lack of the feature being an incompatibility of Chrome.


If you use AJAX on the local computer in a compatible browser, you'll find that the request status returns 0 instead of 200,

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...