1) Enter values on both boxes here:
https://html5demos.com/storage/
2) Refresh page
3) Tell CAD to "Clean, including tabs".
4) Refresh page
5) HTML5 sessionStorage hasn't been cleared (only localStorage)
6) CAD: "Clean local storage"
7) Refresh page
8) Now all HTML 5 storage is deleted. But shouldn't "Clean, including tabs" delete everything, and not just partial HTML5 storage?
Please use the template if reporting a bug especially the browser, OS, CAD version info. I'm going to assume this is Firefox.
The regular cleanup uses the WebExtension API to clean localstorage by host.
The Clear localstorage for this domain injects a content scripts and uses a Web API to clean localstorage and session storage.
Specific implementation details in the first comment of #44
So basically there's nothing I can do about this because the API for WebExtensions doesn't appear to clean session storage. But since it's just session storage, they'll just get wiped when you close the browser anyway.
Windows 7
FF 58.02
CAD 2.1.2
Since "Clear localstorage for this domain" does clear localstorage and session storage, why not also apply this method when using "Clean, include open tabs" (which currently deletes everything but session storage)?
Injecting a content script requires the site to be open which means when a user closes a tab, the extension would need to reopen the tab again, inject the content script
window.localStorage.clear();
window.sessionStorage.clear();
, and then close it again.
As you can see this is not ideal for performance reasons (imagine opening up tab for every domain after cleanup). It's better to just use a WebExtension API which can clean site data even while the site is not open.
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/browsingData/removeLocalStorage
If it was not clear the first time, both buttons use completely different methods to clean localstorage.
Closing as follows: