I need to obtain any event when user clicks the close button of the current browser tab. No one method which I use in such cases worked (for example onunload, unload and pagehide events handling not detection close tab, only change or update tab).
From the Safari documentation:
unload Deprecated, use pagehide instead.
It looks like pagehide actually fires when you click on the "tabs" view to open a new page (see here in ghenne's answer) but other than that, no event even exists for closing browser on Mobile Safari! Found info here and here as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With