[thelist] Re: JS: Cookie Madness

Samuel Murphy smurphy at texterity.com
Tue Feb 3 15:20:43 CST 2004


Don't you need to set the expire somewhat in
the future?

if (!expireDate) expireDate = new Date();

    expireDate.setTime(expireDate.getTime() + (24*60*60*1000)); // 1 day in
the future

   document.cookie = cookieName + "=" + cookieValue + "; expires=" +
expireDate.toGMTString();

-Sam



More information about the thelist mailing list