XMLHttpRequest (XHR) objects are used to interact with servers. You can retrieve data from a URL without having to do a full page refresh. This enables a Web page to update just part of a page without disrupting what the user is doing.| MDN Web Docs
The unload event is fired when the document or a child resource is being unloaded.| MDN Web Docs
The navigator.sendBeacon() method asynchronously sends an HTTP POST request containing a small amount of data to a web server.| MDN Web Docs