Beacons
Widely available since 2020-10-12
The navigator.sendBeacon()
method asynchronously sends an HTTP POST request with a limited amount of data, typically for app state, events, and analytics data. The one-way beacon is guaranteed to be initiated before the browser unloads the page, but the sender does not get to handle the response.
Learning resources on MDN
Browser support (view on caniuse.com)
- Chrome 39 Released on 2014-11-18
- Chrome Android 42 Released on 2015-04-15
- Edge 14 Released on 2016-08-02
- Firefox 31 Released on 2014-07-22
- Firefox for Android 31 Released on 2014-07-22
- Safari 11.1 Released on 2018-04-12
- Safari on iOS 11.3 Released on 2018-03-29
Specifications
- Beacon, from Web Performance Working Group (W3C).
View web-platform-tests results for this feature - View the feature source file (dist) - Edit the feature - Report an issue about this feature