I am working on dotnetnuke website. I want to logoff the user when he closes the browser or tab. Please help me to resolve this. How can I detect browser close event and how can logout the user.
Asked
Active
Viewed 383 times
1
-
1Probably this can help.. http://stackoverflow.com/questions/20853142/trying-to-detect-browser-close-event – Rakesh_Kumar Apr 22 '15 at 05:34
-
I don't want to display any message I just want to clear the session to logout the user. But its not working. – Developer Apr 23 '15 at 03:57
1 Answers
0
You can't detect the browser close or tab close using javascript.
Only you can know the page unload, the following events are OnBeforeUnload & OnUnload Neither of these events can tell you the way that you closed the page.

Anto king
- 1,222
- 1
- 13
- 26