Closed
Bug 886832
Opened 12 years ago
Closed 7 years ago
localstorage not deleted when closed even though "[Privacy - Cookies] Keep until I close Firefox" is enabled
Categories
(Firefox :: Bookmarks & History, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: f201052, Unassigned, Mentored)
References
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0 (Beta/Release)
Build ID: 20130511120803
Steps to reproduce:
Set: Tools > Options > Privacy > History > Custom
Set: Tools > Options > Privacy > History > Keep until: I close Firefox
Visit a site that saves data to the DOM localstorage
Exit Firefox
Actual results:
localstorage was not cleared
Expected results:
localstorage should have been cleared because it is used to store cookies too (but truly invisible and much more persistent).
Mozilla treats Flash local storage as cookies too, as evidenced by fixed bug 625496. localstorage should be treated the same way (or at least provide a setting for this treatment).
Comment 1•12 years ago
|
||
This seems like a pretty reasonable request to me. We'll need to add a method to nsIDOMStorageManager (http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/storage/nsIDOMStorageManager.idl) to clear all DOM storage entries, implement it in DOMStorageManager (http://mxr.mozilla.org/mozilla-central/source/dom/src/storage/DOMStorageManager.cpp), and call it from sanitize.js from the cookie block (http://mxr.mozilla.org/mozilla-central/source/browser/base/content/sanitize.js).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [mentor=jdm]
Updated•12 years ago
|
Assignee: nobody → allamsetty.anup
Reporter | ||
Comment 2•12 years ago
|
||
It appears that Google Chrome has had this feature for a long time. Competition is beating us...
Updated•12 years ago
|
Assignee: allamsetty.anup → nobody
Reporter | ||
Updated•12 years ago
|
Severity: normal → major
![]() |
||
Comment 3•12 years ago
|
||
I started working on this bug, using Josh's instructions as guidelines, but I found the behaviour in this area to be a bit quirky:
- Set localStorage to some value A while cookies are kept "until they expire"
- Restart Firefox
- Change cookie behaviour to "until I close Firefox"
- Restart again
- Set the same localStorage scope/key to a different value B
- Restart again
- Read out localStorage at that scope/key: Firefox returned A (and B really never entered webappsstore.sqlite)
I could reproduce this behaviour on Firefox 23 and Nightly as of yesterday.
If this is actually the right behaviour, maybe the only unexpected part is that Firefox keeps the old values around?
John: could you please check that your testcase isn't affected by pre-existing localStorage data? (just so we know if we see the same behaviour)
Reporter | ||
Comment 4•12 years ago
|
||
Patrick, thanks for starting to work on that. Based on my experience with Firefox, as a user, I think that might be an expected and intended behavior. Cookies that are existing before a cleaning option is applied are somehow "exempted" from the cleaning options. I might be wrong though. You should check some source code / design docs to determine if it's a bug.
Nonetheless, this should not stop you from implementing localStorage cleaning on exit. Thanks.
Comment 5•11 years ago
|
||
Hi,
I want to work on this bug. So can you please assign this bug to me.
Thanks in advance,
Regards.
Updated•11 years ago
|
Assignee: nobody → allamsetty.anup
Updated•11 years ago
|
Status: NEW → ASSIGNED
Updated•11 years ago
|
Assignee: allamsetty.anup → nobody
Assignee | ||
Updated•11 years ago
|
Mentor: josh
Whiteboard: [mentor=jdm]
Comment 7•8 years ago
|
||
(In reply to Allan Gardner (:Mathnerd314) from comment #6)
> Was this fixed by bug 1184973?
I don't think that that bug changed the behaviour of LocalStorage wrt its interaction with the cookie preference, rather just standardizing the code path which it used, but I do think that there is code right now which makes localStorage not survive sessions while the pref is set.
Someone should quickly test to make sure that this bug no longer reproduces, then we can close it.
Flags: needinfo?(michael)
Comment 8•8 years ago
|
||
qawanted for comment 7 (STR in comment 1, example site: https://mdn.github.io/dom-examples/web-storage/)
Keywords: qawanted
Comment 9•8 years ago
|
||
(In reply to John Schimanski from comment #0)
> Set: Tools > Options > Privacy > History > Custom
> Set: Tools > Options > Privacy > History > Keep until: I close Firefox
> Visit a site that saves data to the DOM localstorage
(In reply to Andrew Overholt [:overholt] from comment #8)
> https://mdn.github.io/dom-examples/web-storage/)
Now the localstorage is cleared (the changes on the above page don't persist) even if I just close/reopen the tab in the same session.
55.0a1 (2017-06-07) (32-bit), Win 10 x64.
Keywords: qawanted
Comment 10•7 years ago
|
||
Confirm this is fixed; moving to History component for posterity.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Component: Private Browsing → Bookmarks & History
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•