Closed Bug 980902 Opened 11 years ago Closed 6 years ago

Warn about use of sync XHR during unload and pagehide events

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: smaug, Assigned: twisniewski)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete, site-compat)

Attachments

(1 file)

Currently we warn about use of sync XHR when we're outside unload event listeners. Now that we have sendBeacon, there should be no reason to use sync XHR on the main thread.
Except that it's not enabled by default yet, right? :-)
Ah. Well, let's fix this once it is enabled.
OS: Linux → All
Hardware: x86_64 → All
Bug 990220 enabled sendBeacon by default? What's left? Sync XHR on unload is actually going to bite us (see bug 1109793 for example).
Depends on: 990220
Component: DOM → DOM: Core & HTML

log a warning recommending the use of sendBeacon during unload instead of synchronous XMLHttpRequest

Assignee: nobody → twisniewski
Summary: Warn about use of sync XHR during unload events → Warn about use of sync XHR during unload and pagehide events
Pushed by twisniewski@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7dc8eb2bb2ec log a warning recommending the use of sendBeacon during unload instead of synchronous XMLHttpRequest; r=Ehsan
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68

Added some more text to the article "Synchronous and asynchronous requests", part of the XHR documentation.

Blocks: 1542967
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: