XML Parsing Error: not well-formed in FireFox but good in Chrome

Your server is not returning a content-type, so Firefox assumes that since this is _XML_HttpRequest your response might be XML and tries to parse it. When that fails, it stops trying and reports that this wasn't XML after all.

Chrome likely does the same but doesn't report anything.

I suggest actually sending a Content-Type header indicating what your data is.


Just Add this code. The problem is the server did not specify the mime type and firefox takes it to be xml. This code will specify what Mime type the xhr response is going to be.

beforeSend: function(xhr){  xhr.overrideMimeType( "text/plain; charset=x-user-defined" );},