If my application places HttpOnly cookies on a client and then needs to remove them how can you remove them completely?
You can cause the cookie to expire when the user visits your website, for example:
HttpCookie expiredCookie = new HttpCookie(cookieName);
expiredCookie.Expires = DateTime.UtcNow.AddDays(-1);
Response.Cookies.Add(expiredCookie);
You'll have to do this for every cookie you want to be removed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With