View Full Version : trouble deleting a dynamically named cookie
questor
10-01-2004, 03:59 AM
I make my cookie like this:
document.cookie = 'name="' + whatguy + whatdt + whatfunction +'"';
But I want it to DIE in a later page.
How can I kill it?
liorean
10-01-2004, 04:06 AM
By creating a cookie with the same name that you set an expiry date in the past on. If you can't recover the name for it, you can always read out what cookies are set and figure it out that way.
when writing the cookie you could always specify the page it was saved on, then check for that value when looking to delete it.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.