开发者

cookies not being deleted in ff & firebug

I feel like I'm missing something obvious... but does firebug interfere with cookie deletion? I have deleted them manually

>>>document.cookie
"noticecount=1; sessionid=adba186e76开发者_JAVA技巧5d007a93; "
>>>document.cookie='';
>>>document.cookie
"noticecount=1; sessionid=adba186e765d007a93; "

tried using jquery.cookie:

>>> $.cookie('imgpath')
"cv.jpg"
>>> $.cookie('imgpath',null)
undefined
>>> $.cookie('imgpath')
"cv.jpg"

Also, from looking at live http headers, I can see that the changed cookies aren't sent in subsequent requests.


for document.cookie, if you want to delete a cookie, you can not just assign document.cookie to '', instead you need to add the cookie to document.cookie but with an expiration time which is in the past.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜