Lusito / forget-me-not

Make the browser forget website data, except for the data you want to keep.
zlib License
226 stars 25 forks source link

workers and IDB cleaning #209

Open atomGit opened 4 years ago

atomGit commented 4 years ago

it is my understanding that IndexedDB cannot be cleaned per-domain due to limitations in the WebExt API - perhaps cleaning web/service workers is also subject to this, i dunno

regardless, please consider the option to destroy IDB and worker data globally upon (preferably) domain exit - Site Bleacher does something similar if you want to look at the code, however i think it cleans upon re-visiting the domain rather than on leave

and if anyone has any recent info regarding changes in the API to allow proper cleaning per-domain of this stuff, i'd be interested in knowing

atomGit commented 4 years ago

oh, also @Lusito - i saw in another comment that you weren't aware of any sites using workers - perhaps you've found some by now, but if not, regex101.com uses workers - you can check with about:serviceworkers

Lusito commented 4 years ago

Thanks for the report. service workers can not be cleaned per domain via the API.

Site Bleacher is only working correctly for chrome. On firefox it clears everything rather than just the one domain, which is not what you want. Aside from the fact, that it's not what you'd expect, it would break some sites.

Thanks for the reference to regex101.com. I will keep it in mind for future tests.

atomGit commented 4 years ago

On firefox [Site Bleacher] clears everything rather than just the one domain, which is not what you want.

it's not ideal of course, but i would certainly prefer that workers and IDB gets dumped globally on domain leave rather then only on browser start/exit

i'm making the assumption that when (if) the API ever gets updated, you'll probably add the ability to dump workers and IDB per-domain in which case i'll be switching to FMN - until that time however, which could be months, years ... or never ... i was kind of hoping that you might handle dumping workers and IDB globally on domain leave

i understand this may break some sites (x-domain login, purchases) and that you may not want to expose it to users in general, however it could enabled as a hidden pref - plus then you already have some of the code in place should Moz ever fix the half-baked API

Lusito commented 4 years ago

Having the code in place is not a benefit, since it would be completely different code, which I'd have to remove again. And fixing this when the API gets implemented is really a matter of a minutes.

I see your point, but at this point in time, I have more pressing feature requests to solve before I can focus my time on the features, which are only used by a minority of the users.

Lusito commented 4 years ago

I'll leave it open as a feature request, but I'm sorry to say, that it won't happen anytime soon. Looking at how slow mozilla operates though, it might happen before the API gets fixed ^^

atomGit commented 4 years ago

fair enough - thanks

Lusito commented 4 years ago

Good news everyone, fixes have landed in the firefox codebase. More are to come. See this ticket and related ones: https://bugzilla.mozilla.org/show_bug.cgi?id=1340511

atomGit commented 4 years ago

yes sir - saw that this morning! just for completeness, and if others are interested in the changes, see: 1632990 - Allow WebExtensions to clear ServiceWorkers by hostname 1551301 - Allow WebExtensions to clear IndexedDB by hostname 1340511 - Extend browsingData api for single site

Lusito commented 4 years ago

It's included and working in V3. Still more things to do on V3 though before I can release. Firefox 77 is required for this to work.

atomGit commented 4 years ago

great news - thanks for keeping us up to date

B00ze64 commented 4 years ago

I see you are very active in the META bug for clearing data @Lusito, very nice, we can expect great things from Forget Me Not soon! :-)