navigator.sendBeacon()

A browser function that queues a small POST request to be sent reliably even while the page is unloading.

In more detail

The browser sends the data in the background and the page cannot read any response. It was built for analytics on exit but only supports POST and no custom headers; fetch with keepalive covers the same need more flexibly.

Related terms

Taught in

References