Welcome to WebmasterWorld Guest from 54.234.38.8

Forum Moderators: open

Message Too Old, No Replies

How do I delete a cookie that I have set with Javascript

     
11:28 pm on Feb 7, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 6, 2003
posts:56
votes: 0


I am experimenting with cookies in Javascript and am able to set and read them, but after I do another set, I read it and the old information is in front of what I have just set. How do I delete a cookie that I have set and is it possible to overwrite the contents of a cookie's old values with the new values? Any information would be apprecated!
I hope that this makes sense. Thanks.
12:38 am on Feb 8, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


I don't do much with javascript cookies, but I believe you can set a new cookie with the same path and name -- but use an expires date that's already past. So your new cookie overwrites the original cookie, but then the browser will zap it because it's expired.