Friday, March 2, 2012

Chrome returns errorstatus=0 in ajax call

The first thing you need to check is that you are not running the file locally i.e. file:// should not be there in your browser url. If this is the case you you install a web server such as Apache and then access the file by placing it in the htdocs folder in Apache. If this does not solve your problem continue.

Also make sure that you are not making and across the domain call in ajax.

The reason that sometime ajax get calls does not work on chrome but works on IE and Firefox is that i was closing the outstream in my java code by using out.close. Chrome does not respond well to this so we should not use out.close in java or Response.close in ASP.

No comments: