Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox duplicate cookie (Firefox bug?)

It's my understanding that if you send a cookie with the sane Name, Host, and Path, that it will be interpreted by the browser as a replacement.

This seems to be the case in Chrome, but in Firefox (7.01) I'm instead getting multiple cookies that are completely identical except for the content.

enter image description here

All 3 SqlAuthCookie entries are identical except for the "Content" part.

Is this a bug in Firefox or do I have a fundamental misunderstanding of how cookies work?

like image 225
Davy8 Avatar asked Nov 04 '11 17:11

Davy8


1 Answers

This only occurs if you keep the Cookie window open while the cookies are being set. Once you close and re-open the Cookie window, you should only see the latest value stored.

Similarly, if you delete a cookie while the Cookie window is open, it will still show up in the list until you close and reopen the Cookie window.

I'm speaking from experience - I've been frustrated by the same thing - unfortunately I don't have any proof, nor do I know if this is a bug or an intentional feature.

Update

Interestingly enough, Google Chrome behaves similarly. If you open the Options tab, the cookie values that are displayed under "All cookies and site data" do not change until you close and re-open the tab. I'm guessing this is an intentional feature for both browsers.

like image 114
andrewtweber Avatar answered Oct 20 '22 12:10

andrewtweber