• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to persist a cookie forever ?

 
Edisandro Bessa
Ranch Hand
Posts: 584
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I'm just curious whether there's a way to persist a cookie forever.

By using the HttpSession.setMaxAge() method I'm aware that I can persist a cookie for a given number of seconds which may be days or months, remove the cookie by passing the value zero as parameter, or even destroy the cookie when the browser closes by passing a negative value.

However, I'm not sure whether I can persist a cookie forever. Is there some way to do that ?

TIA,
Edisandro Bessa.
[ October 07, 2006: Message edited by: Edisandro Bessa ]
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope. If you need some data forever, you use a database.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic