Bug Tracker

Modify

Ticket #5280 (closed bug: fixed)

Opened 5 years ago

Last modified 3 years ago

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:
Blocking: Blocked by:

Description

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

comment:1 Changed 4 years ago by snover

  • Status changed from new to pending

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 3 years ago by trac-o-bot

  • Status changed from pending to closed

Automatically closed due to 14 days of inactivity.

comment:3 Changed 3 years ago by jaubourg

  • Resolution set to fixed

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

Changeset: 1d1d4fe112c49cbd704d880b27cc646f2bfe1737

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.