in reply to Deleting cookies

The expiration method does work - there are a few things you can try to track it down (at the time of my reply theres no code to cast my eye over :P ).

First and foremost you need to determine that the cookie is being set by the script. Ok this sounds a little obvious, however I have to use PWS at work (tell me about it) and its very kind to force a standard content header the moment I print something. Bye bye valid headers - bye bye printing that cookie.

I assume you are using plain old CGI for setting the cookie? If you aren't you should be. I have used CGI::Cookie without problem in the past but recently it 'appears' to not be working. Without changing anything else other than using CGI my code functions again.

The code I use is as follows:

my $query = CGI->new(); my $cookie = $query->cookie( -name => 'forms', -value => '', -path => "/" -expiry => "-1d" ); print $query->header(-cookie=>$cookie);


Hopefully that will work for you. Remember to change the cookie name to that of the one you set to log the details in. If not - please post some snippets here :)

Update:

On an additional note - I would recommend that you completely clear you cache. If you use IE (hey! some of us do) then you must go into the temporary internet files folder and clear everything. You must ensure that all of your cookie files are physically deleted. Don't rely on your browser to do it. </code>