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 pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More HTML5 interview questions

View all →