This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JSP and the fly likes logout on browser close Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "logout on browser close" Watch "logout on browser close" New topic
Author

logout on browser close

Alex Kravets
Ranch Hand

Joined: Jan 24, 2001
Posts: 476
How do I run logout routine when user closes a browser?


All right brain, you don't like me and I don't like you, but let's just do this one thing so I can get back to killing you with beer.<br /> <br />- Homer Simpson
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

I wouldn't bother trying. It requires correctly catching browser events client-side (and firing off a request to the server) which is a black art, and never works the way you want it to. Easier is to timeout idle sessions.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Alex Kravets
Ranch Hand

Joined: Jan 24, 2001
Posts: 476
thanks for the info!
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: logout on browser close
 
It's not a secret anymore!