Click here to Skip to main content
15,921,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

How to kill session when browser or tab is closed.plz provode the code, I search in 2 days in google but ,I am not get any sucess, plz help me

1 solution

You can not clear the session when the browser closes. You can handle the window unload event and fire an AJAX call, but you can't be sure it will fire.
Related Threads:
How to kill the session as soon as user closes the browser?[^]
Close/kill the session when the browser or tab is closed[^]

Here is an article:
Session killing (logout) in server when browser is closed using cross button/ALTF4 in ASP.NET[^]

Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900