Mobile browsers can not catch closing tab/browser event

I need to catch closing tab/browser on mobile. onunload & onbeforeunload javascript event can catch refresh page, submit form, redirect page, close tab/browser... It worked perfectly on PC, but when I tried these events on mobile browsers (Chrome on Android, Safari on iOs). It can not catch closing tab/browser event. Please see my code below:

  php echo "Test onunload and onbeforeunload event"; ?>

Could you please advise?


asked Aug 18, 2015 in JAVASCRIPT by rajesh
0 votes

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.