aspose file tools
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

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "logout on browser close" Watch "logout on browser close" New topic

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

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!
Consider Paul's rocket mass heater.
subject: logout on browser close