【发布时间】:2011-05-28 21:17:02
【问题描述】:
我希望我的 cookie 在用户关闭浏览器时消失——我已经设置了一些看起来很有希望的属性,但是即使在关闭整个浏览器后我的 cookie 也会重新生效。
HttpCookie cookie = new HttpCookie("mycookie", "abc");
cookie.HttpOnly = true; //Seems to only affect script access
cookie.Secure = true; //Seems to affect only https transport
为了实现内存 cookie,我缺少什么属性或方法调用?
【问题讨论】:
标签: c# asp.net cookies httpcookie