Closed Bug 496560 Opened 15 years ago Closed 15 years ago

globalStorage/localStorage data cleared along with the cookies (when using Tools -> Clear Recent History)

Categories

(Firefox :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: nostef, Assigned: mayhemer)

Details

(Whiteboard: [wontfix?])

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042523 Ubuntu/9.04 (jaunty) Firefox/3.0.10 Hi. What I am doing in globalstorage: write a value using setItem. get the value using getItem(works great). clear cookies(clearing them one by one doesn't trigger the problem) getItem will return an empty string instead of the value and sometimes this appears in the console: "key is null" at line 1173 of Firefox/components/nsUrlClassifierLib.js Reproducible: Always Steps to Reproduce: Written in the details. Actual Results: An empty string appeared instead of the value. Expected Results: Return the before set value
So if I understand correctly, the problem you're describing is this: 1. Set globalStorage[location.host].test = 1 in a web page 2. Use Tools -> Clear Recent History (in Firefox 3.5+) with only Cookies checked and "Time range to clear" set to everything 3. Get globalStorage[location.host].test in the same web page Actual results: the value is not persisted Expected results: the value is persisted If so, I think DOM storage is treated like cookies by design, but CCing a few people who should know for sure. I've also seen (in 499654) something about "offline-enabled apps", which might be somehow different from the regular pages(?) Dave, Honza, could you comment please? Is this documented anywhere? I couldn't find anything. Related: bug 398478, bug 499654.
Summary: globalstorage getItem returns empty string after emptying cookies → globalStorage/localStorage data cleared along with the cookies (when using Tools -> Clear Recent History)
Version: unspecified → Trunk
Also see bug 506692.
Whiteboard: [wontfix?]
I haven't tested the bug in 3.5, just 3.0.
Yeah, I did two things at once: clarified your report and updated references to reflect changes in UI since Firefox 3. (There's zero chance something like this will be fixed solely in 3.0, so it made sense to talk about the problem in Firefox 3.5+ terms.)
(In reply to comment #1) > I've also seen (in 499654) something about > "offline-enabled apps", which might be somehow different from the regular > pages(?) I think I figured out what it means to be "offline-enabled" - added a note to https://developer.mozilla.org/en/Offline_resources_in_Firefox#Specifying_a_cache_manifest Still not sure how are they supposed to be different from regular pages WRT clearing recent history...
We delete localStorage data along with cookies because the spec suggests (from a good reason) to treat localStorage data same way as cookies. The reason is, in the first place, to prevent user tracking. Why it should not work the same way for offline web applications is obvious as in that case localStorage becomes a user data storage, actually a storage for "user files". It's different from cookies, we would delete your letter or document drafts, your offline stored emails etc. That is bug 499654 about. I suggest WONTFIX.
Assignee: nobody → honzab.moz
Closing as WONTFIX.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.