1 min readJul 7, 2020
We can use fetch() for all major browsers and for IE we can still use XHR. The problem with sendBeacon() is, it send data whenever browser thread is available to send, it may send data before unload, it may send data during the reload, it may send data after the reload as well, and that solution is not working when we want to send data synchronously before navigation or reload.
SendBeacon() can be used for log, analytics but not something that we need data before the page reloads.