5 ms·
This is true and in general websockets (well, and webtransport/webrtc etc) are the only reliable way to detect navigation from the backend since none of the met
by inglor 5y ago
This is true and in general websockets (well, and webtransport/webrtc etc) are the only reliable way to detect navigation from the backend since none of the methods mentioned in the article work if the user simply closed the tab.
- ncann 5y agoonunload/onbeforeunload doesn't work?
- jen20 5y agoWhat if they kill -9 the browser process?
- inglor 4y agoNot always, not necessarily if the tab was in the background when closed (switch then close), not if they force quit (like the other comment I upvoted says), not if chrome updates etc. The other alternatives are opening another type of connection like an RTCPeerConnection to your server and seeing when that closes.