How to delete HttpOnly cookies?

If my application places HttpOnly cookies on the client and then you need to delete them, how can you completely delete them?

+7
c # cookies
source share
2 answers

You can force a cookie to expire when a user visits your site, for example:

HttpCookie expiredCookie = new HttpCookie(cookieName); expiredCookie.Expires = DateTime.UtcNow.AddDays(-1); Response.Cookies.Add(expiredCookie); 

You will need to do this for each cookie you want to delete.

+11
source

You cannot use or delete cookies. You can take all cookies, destroy data and make them expire.

0
source

All Articles