I am seeing some of the server calls (Used for tracking purpose) in my site getting aborted in Firefox while seeing through HttpFox. This is happening while clicking some link that loads another page in the same window. It works fine with popup. The error type shown is NS_BINDING_ABORTED. I need to know is the tracking call is hitting the server or not. It works perfectly with Internet Explorer. Is it any problem with the tool? In that case can you suggest any that can be used in Firefox too.
13 Answers
Because your server is not sending HTTP Expires headers, the browser is checking to see if what is in its cache is current.
The way it does this is to send the server a request saying what the date of what it has in the cache is, and the server is sending 304 status telling the client that what it has is current. In other words, the server is not sending the entire content again but instead sending just a short header to say the existing cache content is current.
What you probably need to fix, is to add Expires headers to what you are serving. Then you will see the NS_BINDING_ABORTED message change to (cache), meaning the browser is simply getting content out of its cache, knowing it has not yet expired.
I should add that, when you do a FireFox forced refresh, it assumes that you want to double-check what is in the cache, so it temporarily ignores Expires.

- 24,203
- 9
- 60
- 84

- 3,338
- 1
- 31
- 28
-
1I've run into a similar problem and expiring/disabling the cache did not fix it. – Paul Kienitz Nov 21 '21 at 16:19
-
Mike's answer below led me to the solution. I had to call preventDefault before setting a new url -- calling it afterwards was no good. – Paul Kienitz Nov 21 '21 at 16:27
-
@PaulKienitz I got it working by ing "Disable Cache" in Firefox's Web Developer Tools. – Geremia Feb 20 '22 at 02:38
You shouldn't be worried just because you see something that looks like a failure code (NS_BINDING_ABORTED
).
In one post a Firefox developer confirms that NS_BINDING_ABORTED
is simply an indication that a page load has been stopped.
It seems perfectly normal that opening a page while another page is being loaded cancels the loads on the first page. It doesn't necessarily mean the loads were aborted before the request got sent to the server, which seems to be what you care about.
[edit: reworded & removed the bit about me not being familiar with HttpFox, as people who see this in 2022 are probably not using it anyway.]

- 31,095
- 13
- 107
- 185
-
The markmail.com link on "one post" is no longer accesible, this should be the correct archived link, instead: https://web.archive.org/web/20091005053108/http://markmail.org/message/m6z77uoixf3qu7u6 – Fons Aug 16 '23 at 14:03
What other javascript do you have on the page? Some javascript might be firing causing the request to be aborted.
I noticed the same thing in my application. I was redirecting the page in javascript (window.location = '/some/page.html') but then further down the block of code, I was calling 'window.reload()'. The previous redirection was aborted because window.reload was called.
I don't know what tracking you are using but it's possible that the request is being sent to your server but the request is aborted because another request was issued afterwards.

- 227
- 3
- 9
I have experienced a similar problem, but have identified the cause.
I have a link in the first cell of a table row, and some Javascript that replicates that link across the other TD's of the row. When I click on the 'real' link (in the first cell) I get this unwanted side-effect; when I click on other cells in the row, all is fine. I feel it's because the script is adding a second link to that first cell, when it already has one.
Hence, two instantaneous requests for the same page, with the first being aborted by the second.
This technique is fairly common, so something to look out for.

- 51
- 1
- 1
-
3Thanks -- this led me in the right direction. Turns out I had to do event.preventDefault and event.stopPropagation before going location.href = newurl, not after. – Paul Kienitz Nov 21 '21 at 16:24
In my case, same NS_BINDING_ABORTED
error, but it was because a "button" element, which I clicked to trigger an event, was missing the attribute "type" value "submit" = How to prevent buttons from submitting forms

- 566
- 2
- 9
- 22
-
2Thanks. I know better, but fell into the same trap. Same error message in the Network tab of browser tools. I saw the page reloading, but thought the browser was mildly crashing on my code. Totally makes sense though...the button is submitting a form causing the reload. – Gen1-1 Nov 20 '22 at 02:03
NS_BINDING_ABORTED error - Best Approach -Using a JavaScript “setInterval” method with the time delay of Min ‘0’ to max ‘100’ milliseconds based on the page load, we can execute our track link request after the default page submit request is processed.
World best solution:
var el = document.getElementById("t");
el.addEventListener("click", avoidNSError, false); //Firefox
function avoidNSError(){
ElementInterval = setInterval(function () {
/* Tracking or other request code goes here */
clearInterval(ElementInterval);
},0);
};

- 32,008
- 25
- 109
- 114

- 47
- 1
- 2
The error NS_BINDING_ABORTED
can have a variety of reasons.
In my case it was garbage in the response headers received from the server, basically a HTTP protocol violation.
Using a web debugging proxy such as Fiddler may sometimes reveal such issues better than the browser's own debugging console (which today does what, I assume, HttpFox did, just better), or at least show more detailed information or clearer error messages.

- 4,750
- 1
- 44
- 69
-
1This is the most correct explanation. Indeed there are oo reasons why this could occur, but one thing that you should always check, is the "**Network**" logs in Firefox built-in `Dev Tools`. Make sure to also enable `Persistent Logs`, in the settings cogwheel, so you don't miss event when a page refreshes or reloads something. The thing to look out for are **`401`** authentication issues. – not2qubit Mar 10 '23 at 18:38
I know this is a very old question but this happened to me recently with Firefox 95. The images of an ancient application made by a collegue of mine were not loaded (or loaded randomly) because of this code:
window.addEventListener('focus', function() {
// omit other code...
location.reload();
}
Once nested this code into a 'load' listener, the issue completely disappeared.

- 299
- 1
- 11
in my case experience, NS_BINDING_ABORTED occurred because missing closed tag between <form>...</form>
example:
<form name="myform" action="submit.php" method="post">
<div class="myclassinput">
<input type="text" name="firstname">
<input type="text" name="lastname">
<input type="submit" value="Submit">
</form>
there is I am forget to write closing </div>
tag before </form>
.

- 1
I note my experience here, just in case... For me it was a website on a local dev server (adress 192.... etc) which was put online on an already used URL like www.something.com The consequence was that an MP4 video (through the H5P library) didn't play, but allowed to be scrolled through the progress bar. And when I copy/paste the URL to this video, this NS_BINDING_ABORTED error appeared on my laptop, while my colleague on the same internet connection had no problem to view it.
I made an ipconfig /release and /renew, then restarted my computer, and it was fixed... maybe it was some old data conflict with the previous content on this already used URL domain? I don't know.

- 76
- 4
For me reason was in Firefox browser preventDefault function not worked in form submit event. This answer helped to solve: https://stackoverflow.com/a/56695472/2097494

- 1,111
- 11
- 13
In my case I had a page that would just redirect to a native application and the redirect was triggered before the "onPageLoad" event. That redirect was forcing Firefox to abort the page from loading, so no images would be loaded.
Waiting for the page to load resolved the problem.
Same behavior was not seen on Chrome or Edge.

- 131
- 1
- 3
In my case this happened when I tried to do ajax
request when page still loading. My code was:
<script type="text/javascript" src="/script.js"></script>
<div id="example-form"></div>
<script type="text/javascript">
var schema = $.ajax( ... );
</script>
I just wrapped my code into onload
:
<script type="text/javascript" src="/script.js"></script>
<div id="example-form"></div>
<script type="text/javascript">
$(window).on('load', function() {
var schema = $.ajax( ... );
});
</script>
So, as I can see, I should not do ajax
requests, when main page was not loaded yet.

- 22,193
- 17
- 108
- 158