A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java SE 8 for the Really Impatient
this week in the
Web Component Certification (SCWCD/OCPJWCD)
Joined: Oct 21, 2005
Jul 13, 2007 00:57:00
This is from the Cookie API.
"A positive value indicates that the cookie will expire after that many seconds have passed. Note that the value is the maximum age when the cookie will expire, not the cookie's current age.
A negative value means that the cookie is not stored persistently and will be deleted when the Web browser exits. A zero value causes the cookie to be deleted."
But I want to know how we can make the cookie live forever.
Joined: Nov 24, 2005
Jul 13, 2007 01:13:00
But I want to know how we can make the cookie live forever
You can set its life time to the biggest value. I let you calculate how many years the maximum "int" value represents
All roads lead to JavaRanch
Joined: Sep 26, 2006
Jul 13, 2007 01:20:00
One example for this is our Javaranch where you log in once and every time you visit, you are automatically logged in and this stayed on my machine for more than 6 months and it continues. Am I right Christoph?
SCWCD 1.4 - Hints for you
SCBCD Hints - Demnachst
, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
Joined: Feb 05, 2003
Jul 13, 2007 11:14:00
Foreeeeever young. I want cookies foreeeeeever young.
A good workman is known by his tools.
I agree. Here's the link:
subject: Cookie lifetime
problem in cookie
Deleting non-persistent Cookie
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014