When a user closes a tab, your analytics flush typically looks like a fetch call inside a beforeunload handler. It works in testing and silently fails in production. The browser's unload policy cancels in-flight requests before they complete, and a fetch fired in beforeunload races directly aga...
Source: [Dev.to](https://dev.to/parsajiravand/your-fetch-in-beforeunload-is-silently-killed-navigatorsendbeacon-guarantees-delivery-17pn)