简体   繁体   中英

Ajax request randomly aborted in IE

I'm having an intermittent problem with my Ajax call in IE9. Here is my code

 $.ajax({
    url: buildUrl('ActiveTasksTable/' + $('#Id').val()),
    type: "POST",
    cache: false,
    data: data,
    traditional: true,
    success: function (data) {
        $('.expandable-content-loading', section).hide();
        $('.expandable-content', section).html(data);

        initTableActiveTasks(type, section);
    },
    error: function (jqXHR, textStatus, somethingElse) {
        $("body").html(jqXHR.responseText);
    }
});

Heres my setup

  • IE9
  • JQuery 1.9.1
  • MVC3

Sometimes this ajax request comes back valid and sometimes it errors. I have checked in fiddler and the response is a 504 Gateway Timeout Error and the response text is empty. However when I check this in IE developer tools, the response is Aborted.

Ive tested this in FF and Chrome and they ALWAYS return a valid response. Is this a problem with IE? Is there a workaround for this?

Any help is greatly appreciated. I've been trying to figure this out all week :(

This turned out to be a problem with the load balancer. Occasionally this happened when the packet acknowledgment took longer than 2seconds between servers.

We installed the application on another server and we no longer experience this problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM