[Javascript] Cookie that never expires

Andrew Gibson andyg at ihug.co.nz
Tue Nov 25 03:51:29 CST 2003


For practical purposes though a cookie that expires in, say + 365 days
doesn't expire....

Coz when the visitor comes, you reset it via  +365 days, not an actual
date.....so the expiry keeps getting pushed out


> Clancy Jones wrote:
> > Howdy neighbors, can someone tell me how to set a cookie so that it
> > never expires?
>
> Can't be done. You can set to expire thirty years in the future, but you
> cannot make it not expire. And browsers may very well change the expiry
> date to something that sounds a bit more realistic, such as capping it
> at 90 days in the future or the like.
>





More information about the Javascript mailing list