Add an option to clear all data stored by a website
Categories
(DevTools :: Storage Inspector, enhancement, P3)
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.
![]() |
||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•4 years ago
|
Comment 3•4 years ago
|
||
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
Comment 4•3 years ago
|
||
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.
Updated•3 years ago
|
Comment 5•3 years ago
|
||
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
Comment 6•3 years ago
|
||
And to show how the UI looks like with the patch applied, I've attached a screenshot.
Sebastian
Updated•3 years ago
|
Comment 7•3 years ago
|
||
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
Updated•2 years ago
|
Description
•