Local storage resets to previous state when "Delete cookies and site data when Firefox is closed" is set
Categories
(Core :: Storage: localStorage & sessionStorage, defect, P3)
Tracking
()
People
(Reporter: guido.knips, Unassigned)
Details
(Whiteboard: dom-lws-bugdash-triage)
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0
Steps to reproduce:
- uncheck "Local storage resets to precious state when "Delete cookies and site data when Firefox is closed" is set" in the privacy settings
- open a site S that uses local storage and change the local storage
- close firefox, start firefox again
- check "Local storage resets to precious state when "Delete cookies and site data when Firefox is closed" is set" in the privacy settings
- change some local storage (e.g. delete it or change it) on the previously visited site S
- close firefox, start firefox again
- visit site S again
Actual results:
Site S still has the local storage from step 2.
Expected results:
The local storage of site S is empty (or the initial local storage of site S).
Comment 1•6 years ago
|
||
Thanks for the bug, however the steps are a bit confusing.
Can you please clarify the steps to reproduce:
- uncheck "Local storage resets to precious state when "Delete cookies and site data when Firefox is closed" is set" in the privacy settings
where do you do this: " uncheck "Local storage resets to precious state "?
- check "Local storage resets to precious state when "Delete cookies and site data when Firefox is closed" is set" in the privacy settings
same question as above: where is or what do you mean by the "Local storage resets to precious state " ?
Comment 2•6 years ago
|
||
Resolving this issue as incomplete for the time being.
Please reopen this issue once the additional information required in comment1 is provided.
Reporter | ||
Comment 3•6 years ago
|
||
Sorry for the delay, I was away from work for some time.
I don't know how that mess of a sentence in step 1 and for happened. I probably tried to copy the line "Delete cookies and site data when Firefox is closed" from the settings, did not manage to copy it and pasted whatever was in the buffer before.
Step 1: uncheck "Delete cookies and site data when Firefox is closed" in the privacy settings
…
Step 4: check "Delete cookies and site data when Firefox is closed" in the privacy settings
I will update the original description
Reporter | ||
Comment 4•6 years ago
|
||
Sorry for the delay, I was away from work for some time.
I don't know how that mess of a sentence in step 1 and for happened. I probably tried to copy the line "Delete cookies and site data when Firefox is closed" from the settings, did not manage to copy it and pasted whatever was in the buffer before.
Step 1: uncheck "Delete cookies and site data when Firefox is closed" in the privacy settings
Step 4: check "Delete cookies and site data when Firefox is closed" in the privacy settings
So the full reproduction steps are:
- uncheck uncheck "Delete cookies and site data when Firefox is closed" in the privacy settings
- open a site S that uses local storage and change the local storage
- close firefox, start firefox again
- check "Local storage resets to precious state when "Delete cookies and site data when Firefox is closed" is set" in the privacy settings
- change some local storage (e.g. delete it or change it) on the previously visited site S
- close firefox, start firefox again
- visit site S again
Updated•6 years ago
|
Updated•6 years ago
|
Comment 5•6 years ago
|
||
The priority flag is not set for this bug.
:johannh, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 6•6 years ago
|
||
I haven't really found the time to debug this, maybe the storage team can take a look, as it's probably on their turf anyway.
Updated•6 years ago
|
Comment 7•5 years ago
|
||
This is definitely how legacy LocalStorage works. It bootstraps the session data from the persisted data, and the session data is then in-memory only with no writes ever made to disk. It's not clear why that decision was made; maybe consistency with cookies (which may have subsequently changed). It's definitely not intuitive. The good news is that clear operations will do the expected thing and data won't return.
The LocalStorage Next Gen implementation that's enabled on nightly and early beta doesn't have this problem, using the same storage for both session-only and persistent storage. The difference is that Sanitizer.jsm tells QutoaManager to wipe all session-persistence storages at shutdown.
The primary issue with attempting to alter the legacy LocalStorage implementation here is that the act of switching from persistent to session-only would presumably not want to actually wipe the storage at the moment of the switch.
Updated•3 years ago
|
Comment 8•1 year ago
|
||
Bug 1599979 should have fixed that on all channels.
Updated•1 year ago
|
Description
•