in reply to Problem to delete a cookie
If I understand your code correctly, you're trying to tell the user's browser that it should delete the cookies. Of course, the user's browser is free to take your advice and delete them, or it could ignore you and keep them until the end of time. You can tell the browser to delete them as a courtesy, so that a well-behaved browser does not need to continue to store them, but you also should invalidate or delete the cookies on the server side, so that if the browser should happen to continue to present them they will be ignored.
I realise this doesn't answer your question, because what you really want to know is whether there's a problem with your code that's causing the browser to fail to understand what you're telling it. However, I don't really know. I am personally unfamiliar with the "Delete cookies" header. According to this (fairly old) document at Netscape, the way to delete a cookie is to re-issue it with the same name, but with an expiration date in the past. This is probably the oldest way to delete a cookie and so therefore probably has the widest browser support, and it seems to be what you are doing (on the line right before the "Delete Cookies" line). That should work in most browsers, but you may have to wait for the browser to be closed and restarted before it will take effect. Also, if the browser in question has a run-continuously-in-the-background feature, "closed and restarted" may mean the computer may need to be rebooted, though I'm not certain about that. As far as the "Delete Cookies" header, I don't know what browsers (if any) support it. Or is that just information for you or the user to know what's going on?
update: I just noticed that you are trying to do them all in one fell swoop by using join to lump the cookies all together into one. That may not work. You may need to expire each one separately by calling CGI::Cookie->new once for each cookie. Beyond that, I don't know.
$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/
|
|---|