seniorHTML5
What is the 'Beacon API'?
Updated Apr 28, 2026
Short answer
A method to send small amounts of data to a server asynchronously before a page unloads.
Deep explanation
Standard XHR/Fetch requests are often cancelled if the user closes the tab. sendBeacon ensures the data is sent without delaying the navigation to the next page.
Unlock with a Pro subscription to view this section.
View pricingReal-world example
No real-world example available yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProCommon mistakes
No common mistakes listed yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProFollow-up questions
No follow-up questions available yet.
Unlock with a Pro subscription to view this section.
Upgrade to Pro