Getting rid of cookies via scripts

They have: 2 posts

Joined: Feb 2002

I'm doing a pretty widespread redesign of our intranet site and was wondering what the easiest way to delete all the cookies set by the previous site would be? It won't affect internet cookies, as we don't give our users internet access through their desktop PC's, so a script that cleans out the entire cookies folder would be desireable.

Thanks in advance!

Smiling

They have: 601 posts

Joined: Nov 2001

If all machines are Windows based, try a script that delets all files in the C:\Windows\Cookies directory.

They have: 2 posts

Joined: Feb 2002

hmmm... we operate in a mixed 2000/98 environment. What could I put in the script to query the OS before it attempts to delete anything?

They have: 601 posts

Joined: Nov 2001

Hmm. The env. variable HTTP_USER_AGENT displayes the web browser the user is using along with the platform he or she is on. You could regex this for /98/ or /2000/ easily.

- wil

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.