Beacon API
E924907
The Beacon API is a web platform feature that enables asynchronous, non-blocking transmission of small amounts of data (such as analytics or diagnostics) from the browser to a server, even when a page is unloading.
Statements (53)
| Predicate | Object |
|---|---|
| instanceOf |
Web API
ⓘ
browser feature ⓘ web platform feature ⓘ |
| advantageOver |
Fetch API for non-blocking unload requests
ⓘ
XMLHttpRequest for unload-time analytics ⓘ |
| alsoKnownAs | Navigator.sendBeacon API NERFINISHED ⓘ |
| canSend |
ArrayBufferView
ⓘ
Blob ⓘ FormData ⓘ URLSearchParams ⓘ USVString ⓘ |
| comparedWith |
Fetch API
NERFINISHED
ⓘ
XMLHttpRequest NERFINISHED ⓘ |
| definedIn | W3C Beacon specification NERFINISHED ⓘ |
| designedFor |
analytics beacons
ⓘ
background data sending ⓘ crash or error reporting ⓘ performance monitoring ⓘ reliable transmission during page unload ⓘ sending data when a page is unloading ⓘ |
| doesNotBlock |
navigation
ⓘ
page close ⓘ page unload ⓘ |
| ensures | data is queued for transfer before page unload completes ⓘ |
| exposedOn | Navigator interface ⓘ |
| hasLimitation |
no progress events
ⓘ
no response body is exposed to script ⓘ no way to read HTTP status code in script ⓘ only POST method is supported ⓘ payload size is user-agent dependent and typically small ⓘ |
| introducedTo | improve reliability of analytics pings ⓘ |
| partOf | Web Platform NERFINISHED ⓘ |
| primaryMethod | navigator.sendBeacon ⓘ |
| returns |
false if the data cannot be queued
ⓘ
true if the user agent is able to successfully queue the data for transfer ⓘ |
| returnType | boolean ⓘ |
| securityModel |
subject to CORS when sending cross-origin requests
ⓘ
subject to same-origin policy for some use cases ⓘ |
| standardizedBy | World Wide Web Consortium NERFINISHED ⓘ |
| supportedBy |
Google Chrome
NERFINISHED
ⓘ
Microsoft Edge NERFINISHED ⓘ Mozilla Firefox NERFINISHED ⓘ Safari NERFINISHED ⓘ |
| supports |
POST requests
ⓘ
analytics data transmission ⓘ asynchronous data transmission ⓘ diagnostic data transmission ⓘ fire-and-forget HTTP requests ⓘ non-blocking data transmission ⓘ sending small amounts of data ⓘ telemetry data transmission ⓘ |
| uses |
Content-Type header inferred from body type
ⓘ
HTTP POST method ⓘ |
Referenced by (1)
Full triples — surface form annotated when it differs from this entity's canonical label.