Cookie-autodelete: HTML5 Session Storage not deleted on Demand

Created on 15 Feb 2018  路  4Comments  路  Source: Cookie-AutoDelete/Cookie-AutoDelete

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?

browserbulimitation

All 4 comments

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:

  • Localstorage can now be cleaned per hostname without having to have tab open.
  • One would expect sessionstorage to be cleared by Firefox internals...somehow.
  • Other than that, the clean storage option in popup will inject the above mentioned lines into the tab. The 'on demand' wording was fulfilled before this issue was created.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

05nelsonm picture 05nelsonm  路  5Comments

tedomedo picture tedomedo  路  3Comments

dacav picture dacav  路  7Comments

xenopeek picture xenopeek  路  4Comments

erotavlasme picture erotavlasme  路  3Comments