Bug 10904

Summary: Synchronous XMLHttpRequest not sent if made from an unload handler
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: XMLAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: beidson, fishd
Priority: P2 Keywords: InRadar
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   

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.