Bug 10904
Summary: | Synchronous XMLHttpRequest not sent if made from an unload handler | ||
---|---|---|---|
Product: | WebKit | Reporter: | Alexey Proskuryakov <ap> |
Component: | XML | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | beidson, fishd |
Priority: | P2 | Keywords: | InRadar |
Version: | 420+ | ||
Hardware: | Mac | ||
OS: | OS X 10.4 |
Alexey Proskuryakov
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.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
See also: http://www.w3.org/2006/webapi/track/actions/137
Darin Fisher (:fishd, Google)
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.
Alexey Proskuryakov
<rdar://problem/5428049>
Alexey Proskuryakov
FWIW, we track async version of this as bug 26817.