When using firefox, an ajax post request i have is being reported as aborted in firebug. The ajax post works fine in IE and Chrome. It is not a cross domain request. I tr
If you are using 2-way SSL auth on a CORS request, Firefox will abort your jQuery ajax requests by default. This is due to differing implementations of CORS in Firefox and Chrome. You can resolve this issue in your client code by adding withCredentials: true
to your XHR instances. In jQuery, you can add this to the ajax
call:
xhrFields: {
withCredentials: true
}
Check out these bug reports for more details:
I've also noticed that Firefox still absolutely refuses to send credentials on OPTIONS preflight requests, so you will need to configure your server to not require them (which seems crazy to me in a 2-way SSL scenario).
I also had similar issues and tried some of the ideas described above. I finally fixed "aborted" state by :
e.preventDefault();
and return false;
to buttons event handlersdatatype: "json", contentType: "application/json",
to jQuery.ajax
method params.Thx to everyone for the clues.