• Post Reply Bookmark Topic Watch Topic
  • New Topic

-1 for timeout and max age

 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On page 273 of HFS&J: A session whose timeout period has been set to -1 will never expire...

And on page 249: setting max age to -1 makes the cookie disappear when the browser exits....

How could both right?

Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because session timeouts and cookie max ages are completely different concepts.
[ December 05, 2005: Message edited by: Bear Bibeault ]
 
ramprasad madathil
Ranch Hand
Posts: 489
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Setting the timeout period to -1 for a session results in the usage of per-browser cookies. The session would be alive as long as the browser from which the application is being accessed is not closed/killed.

ram.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!