This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Session handling  RSS feed

 
Raj Joe
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do i clear the http session data when the user closes the browser.
Can i invalidate a user session when the user closes the browser.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might be able to use JavaScript to send some request back to the server upon closing the browser window. I don't know for sure.

I do know that this is not a Java in General (beginners) type question.

If you're looking for a better understanding of how sessions are handled in Java-based web applications, I recommend moseying on over to the Servlets forum.

I'm moving this thread to the HTML and JavaScript forum...
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37180
515
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Raj,
You can't do this in Netscape at all. There is no way to detect the browser close. The best you can do is let the session timeout.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!