I am trying to catch a event i.e. window close. So i used unload, but it catches both refresh and close. So my action gets triggered for both. Is there a way to catch only close event?
Asked
Active
Viewed 73 times
0
-
Possible duplicate of [How to Detect Browser Window /Tab Close Event?](https://stackoverflow.com/questions/21227383/how-to-detect-browser-window-tab-close-event) – Kewin Dousse Sep 08 '17 at 10:53
-
But no solution there. – Hacker Sep 08 '17 at 11:08
-
2nd answer says it : "You can't detect it with javascript." So you can't. – Kewin Dousse Sep 08 '17 at 11:09