in reply to Deleting cookies
If it was your post as Anonymonk yesterday you will already have seen the answer I gave at Re: Weird CGI Cookie Problem. This does work so if it is not working for you you will need to explain your program logic with a example of what you are doing and details of how it does not work in precise terms.
As noted in the node above to delete a cookie you simply overwrite the original with a cookie with the same name from the same domain and path that has an expiry in the past. What happens is that this new cookie info is sent to the client browser in the HTTP header. The browser parses the cookie info and then writes the new cookie. As each domain/path can only have one cookie of a given name this new cookie will overwrite the old one.
Because the browser is handling this interaction you do not have direct control over what happens. It may choose to delete the cookie immediately, perhaps store the new cookie in memory to be discarded when the browser shuts down (as happens if no expiry is specified) or do nothing if cookies have been disabled. The bottom line is that you are depending on the browser to do the deletion. If it is really vital to delete a cookie don't send it in the first place. Send an ID number cookie that references the data you want perfect deletion control over. *You store this data on the server* Then all you need do is delete the server data and let the cookie expire in it's own time.
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|