checked on 26 Nov 2026
valid until 25 May 2027not rechecked since 25 May 2027
MDN recommends sending analytics with sendBeacon in visibilitychange, because unload, beforeunload and pagehide often do not fire, especially on mobile.
In the source's words
In many situations, especially on mobile, the browser will not fire these events.
Address
stacks.jakubdudek.com/small-web-text-discovery-app/c74
In a document: [[small-web-text-discovery-app#c74]]
JSON