I've put an exagerated example up on the following link
http://homepage.mac.com/zacware/firefox_bug/firefox_bug.htm
NOTE: JQuery and Prototype also have the same problem. Safari does too. The code I included was simply so the file could run without any external libraries being needed.
Here's a jQuery version that produces the same problem
http://homepage.mac.com/zacware/xhr_bug/xhr_bug.htm
Here's the link to my mozilla bug tracker entry on the issue
https://bugzilla.mozilla.org/show_bug.cgi?id=488605
What I did find out by looking around is that I was able to work around my particular issue by using jQuery Ajax Abort method to remove any pending ajax requests during page unload.
This SEEMS to work for me, but your milage may vary...the problem for me is I have a lot of old code that doesn't use jQuery, so updating all of it would be a major effort.
if (self.jQuery)
{
if (self.jQuery.ajax)
{
jQuery(document).ready(function()
{
jQuery.ajaxSetup(
{
beforeSend: function(xhr)
{
jQuery(window).bind('beforeunload',
function()
{
xhr.abort();
}
);
}
});
});
}
}
It would be great if I had an explanation for what's going on or another fix.
No comments:
Post a Comment