This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Servlets and the fly likes how to invalidate a session when browser is closed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to invalidate a session when browser is closed" Watch "how to invalidate a session when browser is closed" New topic
Author

how to invalidate a session when browser is closed

Satchidananda Mohanty
Ranch Hand

Joined: Mar 12, 2008
Posts: 77

Hi there,

I wanted to destroy the session when browser is closed without logout .

Please help !!
Thanks in advance

Zeet

SCJP 6.0
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12671
    
    5
There is no way for the server to detect the closing of the browser reliably.

Just let the built-in time-out mechanism do its job.

Bill

Java Resources at www.wbrogden.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to invalidate a session when browser is closed
 
Similar Threads
how does the server expire the session
session info into db
HttpSessionListener if browser is closed
if browser is closed,does session expire?
Clear firefox cookies on closing the window