fastmultiplication
fastmultiplication

Reputation: 3081

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=adba186e765d007a93; "
>>>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.

Upvotes: 0

Views: 578

Answers (1)

James.Xu
James.Xu

Reputation: 8295

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.

Upvotes: 1

Related Questions