How to solve Firebug’s “Aborted” messages upon Ajax requests?

前端 未结 2 1562
广开言路
广开言路 2020-12-07 02:59

I am using Firebug 1.10.2 with Firefox 14.0.1. When showing a web page, the Firebug add-on has this \"behavior\": Firebug’s “Aborted” message upon Ajax request.

相关标签:
2条回答
  • 2020-12-07 03:07

    I saw this problem when trying to load a JavaScript file using HTTPS, but was serving the site on my local development environment using HTTP. The request to fetch the JavaScript file would fail with the Aborted message in FireBug. Making the requests use the same protocol worked for me.

    0 讨论(0)
  • 2020-12-07 03:14

    Please see the documentation of XHR open() for example here: https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest

    Note: Calling this method an already active request (one for which open()or openRequest()has already been called) is the equivalent of calling abort().

    Just create a new XHR instance whenever you need one. Better yet, use jQuery or other JS library to do AJAX. It should shield you from these intricacies.

    0 讨论(0)
提交回复
热议问题