[thelist] deleting a JS cookie

Syed Zeeshan Haider szh at softhome.net
Thu Dec 19 16:26:02 CST 2002


From: "Tom Dell'Aringa"
To: <thelist at lists.evolt.org>
Sent: December 19, 2002, Thursday 8:21 PM
Subject: [thelist] deleting a JS cookie


> I am setting this cookie:
>
> document.cookie = "groom=<?=$groom?>; expires=Wdy, 01-Mon-2010
> 12:12:12 GMT; path=/";
>
> Then, to delete it I am trying:
>
> document.cookie = "groom=nothing; path=/; expires=Thu, 01-Jan-70
> 12:00:01 GMT";
>
> This doesn't work, it sets it to 'nothing' even with the date at
> 1970. Is there a better way, what mistake am I making?

I was used to believe that just document.cookie="" can delete the cookie. I have
obsevered this in some cases. When I set the cookie with JS, I use
document.cookie="" to delete it.
Any JS experts please!

Syed Zeeshan Haider.
http://syedzeeshanhaider.faithweb.com/




More information about the thelist mailing list