Open Bug 1448291 Opened 6 years ago Updated 10 months ago

Add an option to clear all data stored by a website

Categories

(DevTools :: Storage Inspector, enhancement, P3)

59 Branch
enhancement

Tracking

(Not tracked)

People

(Reporter: u614622, Unassigned)

References

(Blocks 1 open bug)

Details

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

Attachments

(2 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
Attached image Clear all storage data.png (deleted) —

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
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: