How can I remove an HTTP_COOKIE cookie from the browser using classic ASP?
Asked
Active
Viewed 1.2k times
3
-
1If you need to remove session cookies then check my answer here: http://stackoverflow.com/a/19709928/421891 – Anton Palyok Oct 31 '13 at 15:03
2 Answers
0
A cookie is a user's property once it is sent to his computer. you cannot actually remove it manually from his/her computer as this would lead to security flaws. So the solution is using the expire property of a cookie. For example setting the cookie's expires property to a previous or older time, ensures that the browser automatically deletes/discards the cookie. For eg:
myCookie.Expires = DateTime.Now.AddDays(-1d);

loxxy
- 12,990
- 2
- 25
- 56
-
How to get name of cookie from request.ServerVariables("HTTP_COOKIE")? – user446573 Sep 13 '10 at 17:41
-
-
Please remember to mark answered questions. Its most polite to reward those spending time on your problem. – BerggreenDK Oct 15 '10 at 01:15