I have browsed through out the internet. I can't find a proper solution for this. Is there a proper way to kill/end session when browser or tab is closed without logging off?
I have tried all the codes in javascript that I found on internet. None of them work.
All my users use IE only. So the code can work for that alone. Any tech is fine with me ie, javascript, jquery, ajax. Is there any solution for this? I know HTTP is stateless, browser event is client side and all that. But someone should have a working code for this. Please help.
I have browsed through out the internet. I can't find a proper solution for this. Is there a proper way to kill/end session when browser or tab is closed without logging off?
I have tried all the codes in javascript that I found on internet. None of them work.
All my users use IE only. So the code can work for that alone. Any tech is fine with me ie, javascript, jquery, ajax. Is there any solution for this? I know HTTP is stateless, browser event is client side and all that. But someone should have a working code for this. Please help.
Share Improve this question asked Oct 25, 2013 at 6:30 user1890098user1890098 5172 gold badges10 silver badges26 bronze badges 2- 1 call your logout page via ajax on window.onbeforeunload event – Voonic Commented Oct 25, 2013 at 6:32
- Possible duplicate of stackoverflow./questions/13443503/… – I'm with Monica Commented Oct 25, 2013 at 6:32
1 Answer
Reset to default 1There is no working code for this. The only 100% working way, especially in case of IE – using keep-alive requests and clear session by timeout on user inactivity.