[英]JQuery removeCookie not working on Internet Explorer 7
I have the following snippet of code 我有以下代码片段
jQuery.removeCookie("foo", { path: '/foo' });
Which works fine in chrome, but in IE the cookie isn't removed. 在chrome中可以正常工作,但在IE中不会删除cookie。 When I inspect the cookies in chrome, I can see it is under path /foo .
当我检查chrome中的cookie时,可以看到它在路径/ foo下 。 I have tried the following call also with a trailing slash on the path, and with no option argument at all, but don't get it working in IE.
我也尝试了以下调用,并在路径上加上了斜杠,并且根本没有选项参数,但不要让它在IE中工作。
How to remove cookies in IE? 如何在IE中删除Cookie?
根据您的jQuery版本,通常可以使用:
$.cookie("name", null, { path: '/' });
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.