File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

if browser is closed,does session expire?

 
alex han
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1 in a web application,if a user closed his browser(platform is windows),does his session that in server is expired?
2 if he not close the browser ,but navigator to
another page that no relationss with this web application . does his session that in server is expired?

3 if above two not come into existence,is there
any method that let session expire when user closed browser or navigator to another page??

thanks a lot
 
Amol Desai
Ranch Hand
Posts: 82
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
1. If the user closes the browser , his session in that server is expired.
2. No his session in the server is not expired
if he navigates to another page that has
no relationss with this web application
3. With respect to answer 2, you cannot expire the session by opening a new browser window without closing the existing window,since the server does not know this since it is the client side activity.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
han,
Please change your name to be compliant with JavaRanch's naming policy. It should not be obviously fictitious.
Your displayed name should be 2 separate names with more than 1 letter each. We really would prefer that you use your REAL name.
You can change your name: here.
Thanks,
Cindy
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13048
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Not exactly - his cookie that relates to the session is lost by the browser but the actual session object stored on the server is not invalidated until the servlet engine timeout is hit.
The subject of how to detect that a user has "left the site" has been discussed numerous times here - dig around in the archives.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic