5

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.

What should I make? Is it so dangerous that I must improve my web application because the presence of some error, or it is a Firebug bug or something else?

7
  • So what exactly is the question? DO you suspect a firebug bug? Try the built-in inspector in Chrome. You think you made the same mistake as in the article (reusing XMLHTTP requests prematurely)? Get rid of the reuse, get the functionality right at first, optimize later if needed at all.
    – Szocske
    Aug 24, 2012 at 21:10
  • @Szocske - (1) Yes, I think I "made the same mistake as in the article". What "reusing XMLHTTP requests prematurely" exactly means? (2) Why I "could" / "may" get rid of the reuse?
    – user12882
    Aug 24, 2012 at 21:13
  • Just instantiate a new XHR object every time you need one. If it turns out to be a performance issue, you can always add a pool later. Trying to get by with just one XHR instance is premature optimization.
    – Szocske
    Aug 24, 2012 at 22:04
  • @Szocske - You: "Just instantiate a new XHR object every time you need one". I: Practically speaking, are you referring to "unbind" something? P.S.: your last comment did not clarify at all my "sub" question (2)... is there a reason to "get rid of the reuse"?
    – user12882
    Aug 25, 2012 at 2:18
  • I don't understand what you mean by "unbind". You want to do an AJAX request? Create a new XHR instance. Sub question 2: Read the blog post you linked along with the XHR.open method document I quoted in the answer: if you reuse the same XHR instance before it's done, it gets "aborted". This is the reason you should not reuse one XHR instance and create a new one when you need one. Better yet, use jQuery or other library to shield you from such details.
    – Szocske
    Aug 25, 2012 at 18:08

2 Answers 2

5

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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.