Bug Tracker

Opened 11 years ago

Closed 11 years ago

#10455 closed bug (invalid)

Global object created but not cleaned up in all IE browsers when aborting AJAX requests

Reported by: Tobias Krogh <[email protected]…> Owned by:
Priority: low Milestone: None
Component: ajax Version: 1.6.4
Keywords: Cc:
Blocked by: Blocking:



I have no idea what is happening. So maybe you can help me.

When a pending ajax request is aborted in IE browsers there is a new global object called "jQuery" + (random number?), for example "jQuery16405272192696596443".

This happens in every IE from 6 to 9 but not in Chrome, Safari, FireFox in their current stable versions. I am a bit lost and found nothing similar. I created a little test page to determine whether it started due to some own code or just in this little piece.

Example HTML:

<!DOCTYPE html>
    <script src="http://code.jquery.com/jquery-1.6.4.js"></script>
    <div id="output"></div>
      $(function() {
        var ajaxRequest = $.ajax("foobar.html", { cache: false });

        var prop;
        for (prop in window) {
          if (prop.indexOf("jQuery") === 0) {
            $("#output").append($("<p>").html("global jQuery object: " + prop));

Output in IE6-9:

global jQuery object: jQuery
global jQuery object: jQuery16405527471665005403

Output in Safari, Chrome, FireFox, Opera:

global jQuery object: jQuery

Anyone seen something like that? Am I doing something wrong? Is it an expected behavior?

Best regards

Change History (2)

comment:1 Changed 11 years ago by Tobias Krogh <[email protected]…>

Created also a jsFiddle for that: http://jsfiddle.net/agdsX/

comment:2 Changed 11 years ago by timmywil

Component: unfiledajax
Priority: undecidedlow
Resolution: invalid
Status: newclosed

An event is added in IE for ajax requests to handle aborting on unload. This is why you see the data expando and it is expected.

Note: See TracTickets for help on using tickets.