How to detect if a request was aborted?

后端 未结 4 1136
既然无缘
既然无缘 2020-12-03 02:54

I am making a request and then right after it I abort.

var x = $.get(url, function (d, e, xhr) { alert(d); });
x.abort();

The problem is th

4条回答
  •  半阙折子戏
    2020-12-03 03:27

    I found here that the xhr will return with status 0. Seems to be a jQuery 1.4+ bug. On 1.3 it called the error handler.

提交回复
热议问题