PDA

View Full Version : About Cookie


anandraj
11-21-2002, 07:13 AM
Hi All,
I am using Cookie in the CLient Side to store the name of the User When I restart my System the Cookie gets deleted, How to retain the Cookie for Infinite Time. If i want the Cookie for One Year I can set the Expires to One Year but How to do it for Infinite Period of Time.
Thanks in Advance
Anandraj.A.

jkd
11-21-2002, 11:20 AM
This has nothing to do with DOM scripting, at all, so I am moving this to the Javascript Programming forum.

krycek
11-21-2002, 12:27 PM
well as far as I know, you can't actually set an "infinite" life for a cookie - they all go mouldy at some point! ;) lol

however, you can set a long period of time, like you were saying one year, try setting something like ten years. There is such a small possibility of someone using your site, then not coming back until ten years later, with the same system, unchanged etc. and your site unchanged... well, we may as well say it is impossible.

So, setting a cookie for a number of years is as close to infinity as you are going to get :)

::] krycek [::