Ajax: How to prevent jQuery from calling the success event after executing xmlHttpRequest.abort();

后端 未结 6 1212
一个人的身影
一个人的身影 2020-12-31 16:34

Using jQuery\'s $.ajax() function. Wherether the request has been purposely aborted, or if the server is down (not responding) it appears the same outcome happens;

6条回答
  •  萌比男神i
    2020-12-31 17:10

    I've noticed this same behavior, and request.onreadystatechange = function () {}; before calling .abort() does resolve the issue.

提交回复
热议问题