Skip to main content

Bug Tracker

Side navigation

#10455 closed bug (invalid)

Opened October 08, 2011 09:51AM UTC

Closed October 08, 2011 04:35PM UTC

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

Reported by: Tobias Krogh <tobias@krogh.de> Owned by:
Priority: low Milestone: None
Component: ajax Version: 1.6.4
Keywords: Cc:
Blocked by: Blocking:
Description

Hi,

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>
<html>
  <head>
    <title>title</title>
    <script src="http://code.jquery.com/jquery-1.6.4.js"></script>
  </head>
  <body>
    <div id="output"></div>
    <script>
      $(function() {
        var ajaxRequest = $.ajax("foobar.html", { cache: false });
        ajaxRequest.abort();

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


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

Attachments (0)
Change History (2)

Changed October 08, 2011 09:54AM UTC by Tobias Krogh <tobias@krogh.de> comment:1

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

Changed October 08, 2011 04:35PM UTC by timmywil comment:2

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.