Ajax post being aborted by firefox (not seen in Chrome or IE)

FiveTools picture FiveTools · Oct 30, 2012 · Viewed 17.9k times · Source

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 tried looking at the issue using fiddler, and when fiddler is capturing web traffic (with options set to decrypt https) the post works. The post issue cannot be created in my local development environment, as all Firefox attempts successfully post the data I'm sending via ajax. Any idea why the post works while fiddler is running? It might give me some idea of how to get it working.

$.ajax({
            type: 'POST',
            url: '/Save',
            data: JSON.stringify(dataset),
            datatype: "html",
            contentType: "application/json",
            success: function (data, textStatus, jqXHR) {
                //alert("success");
            },
            error: function (jqXHR, textStatus, errorThrown) {
                //alert("error");
            }
        });

Also, this ajax request is called by a number of methods, and only when the largest of the datasets is sent does it fail.

Answer

Marys picture Marys · Nov 9, 2012

Try only

async: false

in ajax option, I had the same problem.