Open Bug 1448291 Opened 8 years ago Updated 1 year ago

Add an option to clear all data stored by a website

Categories

(DevTools :: Storage Inspector, enhancement, P2)

enhancement

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: u614622, Assigned: sebo)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-needed, Whiteboard: user-suggestion)

Attachments

(3 files, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0 Build ID: 20180319141609 Steps to reproduce: Open FF Web Developer Tools. Go to Data panel. Try to clear all data from cookies, sessionstorage, localstorage, IndexedDB etc. There is no “Clear storage”. Actual results: Every time i want to clear all site data i have to click on cookies, session storage, localstorage, IndexDB etc. and clear them separately. Expected results: There should be Clear storage button which clear selected data from cookies, sessionstorage, localstorage, IndexedDB etc. Something similar like in Chrome.
Component: Untriaged → Developer Tools: Storage Inspector
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2
Product: Firefox → DevTools
In feature backlog
Severity: normal → enhancement
Priority: P2 → P3

Any update on this?

Blocks: 1312444
Whiteboard: user-suggestion
Summary: “Clear storage” button. → Add an option to clear all data stored by a website

I guess, the easiest approach to this is to use the SiteDataManager module for this like it's done in https://searchfox.org/mozilla-central/rev/b2433a832c250c55255e0ee37d05192d04f20427/browser/base/content/pageinfo/security.js#6-8,222.

Sebastian

The toolbar button calls the same logic that is used in Page Info > Security > Clear Cookies and Site Data.
That means it first fetches all hosts related to the current website's host and then opens the dialog Removing Cookies and Site Data to confirm the removal of the data.
Once the user confirms the removal, the data storages are cleared and the current view updated to reflect that the data got removed.

Assignee: nobody → sebastianzartner
Status: NEW → ASSIGNED

Note that the patch I've created doesn't include a test, unfortunately, as I don't know how to control the Removing Cookies and Site Data dialog.

Also, please let me know whether the chosen UI is ok. I've chosen to add a toolbar with the clear button above the storages because it is consistent with the other panels. And I chose to display the dialog for removal because it shows that also subdomains are affected by the deletion.

Sebastian

Keywords: dev-doc-needed

And to show how the UI looks like with the patch applied, I've attached a screenshot.

Sebastian

Attachment #9203079 - Attachment is obsolete: true

As discussed with Belén, this feature has to wait until the Fission work is done and probably also the rework of the code behind the Storage Inspector. So I unassign myself for now.

Sebastian

Assignee: sebastianzartner → nobody
Status: ASSIGNED → NEW
Severity: normal → S3
Whiteboard: user-suggestion → user-suggestion [devtools-triage]

We already support clearing each "category" individually, so we could have a button in the UI to clear everything at once

Priority: P3 → P2
Whiteboard: user-suggestion [devtools-triage] → user-suggestion
Version: 59 Branch → unspecified

Any updates? It's really sad to see a simple feature from 7 years ago with no progress 🥲

The button added resembles the functionality offered via the "Clear cookies and site data..." option available in the address bar.

Assignee: nobody → sebastianzartner
Status: NEW → ASSIGNED

Since the Fission work is done, I rebased and updated my previous patch. It basically works the same as before, with the difference that clearing the data is now restricted to the current domain. So it basically does what the "Clear cookies and site data..." option in the address bar does.

As the Storage Inspector is still based on XUL, I didn't have to change the patch much. Though see also the discussion in https://phabricator.services.mozilla.com/D105122.

The patch still doesn't have a test case, unfortunately.

Sebastian

See Also: → 1349533
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: