Hacker News new | past | comments | ask | show | jobs | submit login

Weird window.onbeforeunload was not mentioned



Probably because this is discouraged.

Check here: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/s...

> However, this is extremely unreliable. In many situations, especially on mobile, the browser will not fire the unload, beforeunload, or pagehide events.


Because it is synchronous/thread-blocking.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: