PDA

View Full Version : Removing old cookie info


Nomad
03-23-2004, 05:11 AM
Hi

I have a program that writes a cookie to the clients pc. I have noticed however, the the cookie also contains info from another piece of software that is no longer on my system.

I.E. it looks something like this :-

old_system_name
value
domain
etc...
etc..
*
my_system_name
value
domain
etc...
etc..
*

Is there some way that I can clear the old junk?

raf
03-23-2004, 08:31 AM
You can read the cookie. Replace it's content with new or the edited old content, and then set the cookie again. It will replace the older cookie.

Nomad
03-23-2004, 08:48 AM
The old data has been cleared. Thanks for the help.

raf
03-23-2004, 11:22 AM
Not sure i follow you.

You can remove/edit/append old content, but just clearing it wount remove the cookie. If you want to remove the cookie, then you need to reset it, with an expirationdate in the past (a few hours/days back. The cookie will then be set and immedeately expire and be removed)

Nomad
03-23-2004, 01:40 PM
I didn't exactly clear it. It cleared itself on my browser by accident. I was testing something and set my cookie option to no cookies. When I set it back to normal and ran my system, the old data was gone.

I also establish that the system that originally created it was not put into "production" so the old data would not be on anyone else's system so I don't need to worry about that.

Thanks for the help though. If I have the problem again in the future at least I know to reset it with an expirationdate in the past. That's useful info to keep in mind.

Thanks again.