Bug 10904 - Synchronous XMLHttpRequest not sent if made from an unload handler
Summary: Synchronous XMLHttpRequest not sent if made from an unload handler
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2006-09-17 13:04 PDT by Alexey Proskuryakov
Modified: 2010-06-14 10:30 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2006-09-17 13:04:46 PDT
With bug 10852 fixed, making such a request no longer causes a crash, but the request needs to be actually sent - this is needed e.g. for usage statistics or for cleaning up server-side sessions.

NB: looks like closing a window and navigating to a new URL are handled differently in this respect.
Comment 1 Alexey Proskuryakov 2006-09-19 05:41:41 PDT
See also: http://www.w3.org/2006/webapi/track/actions/137
Comment 2 Darin Fisher (:fishd, Google) 2009-04-26 07:12:29 PDT
I don't think there are any promises that an asynchronous XHR is sent from unload.    Browsers allow the web page to create such a request, but they make no guarantee about delivery.  The requests spawned from unload are usually just aborted immediately afterwards.

I believe web developers expect to have to do a _synchronous_ XHR if they want to make a network request from unload.
Comment 3 Alexey Proskuryakov 2009-09-18 12:43:47 PDT
<rdar://problem/5428049>
Comment 4 Alexey Proskuryakov 2010-06-14 10:30:02 PDT
FWIW, we track async version of this as bug 26817.