Bug Tracker

Opened 14 years ago

Closed 12 years ago

Last modified 12 years ago

#5280 closed bug (fixed)

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.

Change History (3)

comment:1 Changed 12 years ago by snover

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!

comment:2 Changed 12 years ago by trac-o-bot

Status: pendingclosed

Automatically closed due to 14 days of inactivity.

comment:3 Changed 12 years ago by jaubourg

Resolution: fixed

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

Changeset: 1d1d4fe112c49cbd704d880b27cc646f2bfe1737

Note: See TracTickets for help on using tickets.