Closed Bug 499654 Opened 15 years ago Closed 14 years ago

localStorage cleared when clearing cache data only under some conditions, profile specific

Categories

(Firefox :: General, defect)

defect
Not set
major

Tracking

()

RESOLVED INVALID

People

(Reporter: mayhemer, Assigned: mayhemer)

Details

(Keywords: dataloss)

STR:
1. have an offline-allowed web application that stores some data to localStorage
2. open the "Clear recent History" dialog, switch to "Everything" and check only "Cache"
3. localStorages for all offline-allowed web applications get cleared

Expected one of these:
a. localStorage is erased when deleting cookies only or better:
b. have a new section (check box) for deleting "offline application user data" because the localStorage data stored by an offline app is nigher a cookie nor a cache data; this should also be option for data in a structured database when we introduce it
Bug 398478 caused this.
Assignee: honzab.moz → nobody
Component: DOM → General
Product: Core → Firefox
QA Contact: general → general
Version: 1.9.1 Branch → Trunk
I think you probably mean that bug 480169 caused this? Bug 398478 added a separate option that's since been removed in that dialog. But I thought we fixed this in bug 497656...
Which build are you testing?
(In reply to comment #2)
> I think you probably mean that bug 480169 caused this? 

No, following hunk added deletion of storage data when deleting offline cache:
http://hg.mozilla.org/releases/mozilla-1.9.1/diff/25b6bca5517d/browser/base/content/sanitize.js, it's bug 398478. It's IMHO wrong.

> Bug 398478 added a
> separate option that's since been removed in that dialog. But I thought we
> fixed this in bug 497656...

It's about a preference, not about deletion itself.

(In reply to comment #3)
> Which build are you testing?

I am using shiretoko.

I think we are missing one more option for "user data" or "offline applications user data". It's missing and it's also said in bug 497656 those options are missing.
So, is there a voice against to fix this bug? Otherwise I take it and start working on it as per the description.
-> me
Assignee: nobody → honzab.moz
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Jason, do you have any opinion on this?
Flags: blocking-firefox3.6?
Johnath and I just looked through the code, and don't see where http://mxr.mozilla.org/mozilla-central/source/browser/base/content/sanitize.js#171 gets hit unless the preference is set to be true, and as per bug 497656 we don't migrate that preference over and it defaults to false.

In other words, I suspect that somehow that preference has been modified on your system, and that this isn't the default behaviour. Can you confirm this with a new profile? If you can't, I suggest we close this as INVALID.

If this bug is VALID, then I don't think it blocks. It's unclear to me how users think of localStorage() data; sometimes it's the same as cookies, other times it's meant to be more permanent (like storing bits of the application data). It feels like what you actually want is a spinoff that advocates putting control for clearing offline data back in Clear Recent History, and a discussion about the best UI for that.
Flags: blocking-firefox3.6? → blocking-firefox3.6-
> In other words, I suspect that somehow that preference has been modified on
> your system, and that this isn't the default behaviour. Can you confirm this
> with a new profile?

I tested this on Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2pre) Gecko/20100106 Namoroka/3.6pre, Mike's right: localStorage is not cleared when only selecting "Cache" in Clear Recent History.

I tested both with "offline-allowed web application" (one that uses an offline manifest - http://demos.hacks.mozilla.org/openweb/todo/ ) and a regular page (google).

> It feels like what you actually want is a spinoff that advocates putting
> control for clearing offline data back in Clear Recent History
Filed bug 538595.

Resolving this one as invalid.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
I'm able to reproduce with Shiretoko, Namoroka and Minefield but only with my profile. Going to investigate. I'm changing the summary. With a clear profile I cannot reproduce.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Summary: localStorage cleared when clearing cache data only → localStorage cleared when clearing cache data only under some conditions, profile specific
Got it. I have set a UI-invisible pref privacy.cpd.offlineApps to true. This caused DOM storage be clear even there would be no option in the dialog selected. Reclosing.
Status: REOPENED → RESOLVED
Closed: 15 years ago14 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.