Cookies... Eat me


Just another note on cookies, about the way to delete them.

Because you can't have access obviously to the user disk to delete your cookie, you have to do something like this:

Response.Cookies("MyCookie").Expires = DateTime.Now.AddDays(-30)

Great, it works but not immediatly. So I suggest that you write again the cookie with empty values to really empty the cookie before it disappear.

I had to do that because the clipboard function I use is a panel visible or not.

So if I delete the cookie, and the user make visible the clipboard very quickly, the cookies values are still there. Emptied it solved the problem, well for me.


No Comments