Click here to Skip to main content
15,885,309 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
logout when user close the browser with out logout.

I tried to write in master page in onuload and onbefore unload but it gets invoked when page is refreshed and every page load and if user click back.

I tried to write javascript function in global.asax session_End file but it had some problem when i try to write javascript in that file

Please help me to fix that problem

Advance Thank You..
Posted

I have yet to see a good example of this that works under all circumstances: it is very difficult to ensure that users are logged out properly. Instead, make your cookies expire when the browser is closed, and the user is effectively logged out when he next tries to log in.
 
Share this answer
 
Comments
Monjurul Habib 5-Jun-11 13:54pm    
nice advice,my 5.
Wonde Tadesse 5-Jun-11 16:27pm    
5+.
 
Share this answer
 
v2
Comments
ramsssssssssss 5-Jun-11 14:34pm    
its not working properly already i tried this one
can u give me exact solution i am expecting javascript

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