Jump to content

Google Chrome and File Reading with jQuery AJAX


matoro260

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.

Link to comment
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,

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...