Aborting a jQuery getJSON XMLHttpRequest

后端 未结 4 549
梦毁少年i
梦毁少年i 2020-12-29 10:25

Turns out this was an artefact of a Firebug bug. The Ajax request was cancelled, but Firebug continued reporting it as active. Details here.


I have long runnin

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-29 11:08

    Another great article on handling this is found here: http://www.bennadel.com/blog/1500-Catching-Timeout-Errors-With-jQuery-Powered-AJAX.htm.

    I simply converted my .getJSON request to .ajax and added the timeout/error handling.

    Thanks!

提交回复
热议问题