This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session

 
Sharma Anjali
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Page 248 HF

By default the cookie lives as long as the session. Once the client quits his browser , the cookie disappears.


Does that mean the session expires as soon as the client quits his browser?
But session is on the server and has no clue about the client's browser state.
 
Deb Sadhukhan
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Certainly it does not mean the session expires as soon as the client quits his browser. Cookie that is used to store session information on the client side, so that it can be sent to the server with subsequent requests, expires. This is the cookie that is used to track session (if necessary). So, even if you close browser window, the session object on the server still stays alive.

You are absolutely right, session is on the server and has no clue about the client's browser state.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic