Dec 10 2010

sessionStorage & cookie’s not disappearing in Firefox

Published by at 8:16 pm under Coding

Something that had me staring at my screen in exasperation recently is Firefox’s behaviour with cookies. Specifically cookies with no expiry date, which should disappear when the session ends – however I was closing Firefox, reopening and the cookie was still there. In all the other browsers things were working as expected with the cookie being deleted, just not in Firefox.

As it turns out the culprit was the ‘save my current tabs’ option, if you have this turned on, Firefox saves all your cookies (& now sessionStorage) so you can resume browsing where you left off – essentially it treats it as if your session never ends.

If you turn this option off you’ll see the cookies & sessionStorage being removed as you’d expect.

Comments Off on sessionStorage & cookie’s not disappearing in Firefox

Comments are closed at this time.