3 ms·
Show HN: How fetch(keepalive) Broke in High-Latency Regions
- deleted 8mo ago[deleted]
- adwait12345 8mo agoI built a small analytics service and noticed that `page_view` events were missing for users in high-latency regions, while later events like `scroll_depth` were still arriving. It turned out to be related to how `fetch(..., { keepalive: true })` behaves during page lifecycle events. Curious if others have seen similar issues or handled this differently.
- XCSme 8mo agoHow reliable is sendBeacon though? Last time I checked, maybe browsers had it disabled by default.
- adwait12345 7mo agoit works, its built for telemetry purpose only
- XCSme 7mo agoYeah, but that's why many blockers block it, right?
- adwait12345 7mo agoYep it can be blocked by third party extensions/ad blocker, so analytics services use both, One as fallback for other. If you try to open tracking script from GA you will find both fetch & beacon.