Skip to main content

Bug Tracker

Side navigation

#5280 closed bug (fixed)

Opened September 21, 2009 05:50PM UTC

Closed November 11, 2010 11:09PM UTC

Last modified January 09, 2011 09:21PM UTC

AJAX requests should abort on unload (they reserve connections in IE)

Reported by: bkrausz Owned by:
Priority: major Milestone: 1.4
Component: ajax Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:

There is a bug in IE (seen in 7, heard about in others) where AJAX requests that are open when the window is closed still reserve connections. This means that if you open and close two windows using long-polling, the next time you open a page on that domain it will hang forever. The only fix is to restart IE.

The fix for this is to add an unload event that aborts the requests (in IE7 at least, I read that IE6 does not have such a mechanism). I see no reason not to do this, but wanted to get feedback before writing a patch.

Also need a test case, but it should be fairly simple to write (I'll try to get to it tomorrow)...just make an AJAX request to a page that sleeps forever. Refresh the page twice and watch the IE death.

Attachments (0)
Change History (3)

Changed October 14, 2010 03:14AM UTC by snover comment:1

status: newpending

This ticket has been marked as missing a test case. In an effort to reduce the number of outstanding tickets in the bug tracker, it will be closed automatically in 30 days. In order to prevent this from happening, please provide a working test case. If a test case has already been provided and our records are wrong, please respond to the ticket so that it can be fixed. Thank you!

Changed November 11, 2010 11:09PM UTC by trac-o-bot comment:2

status: pendingclosed

Automatically closed due to 14 days of inactivity.

Changed January 09, 2011 09:21PM UTC by jaubourg comment:3

resolution: → fixed

Moved unload abort code so that the event is only bound if the xhr transport is used. Fixes #5280.

Changeset: 1d1d4fe112c49cbd704d880b27cc646f2bfe1737