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

Timed Indexed DB Scrubber #53

Closed Joel889 closed 6 years ago

Joel889 commented 6 years ago

Indexed DB, located at FF Profile\storage\default doesn't clean automatically due to missing API functionality. It does clean on demand however, so the functionality already exists in the addon.

What do you think of implementing an optional, user-defined, scrubbing interval for Indexed DB? Or even better, this could run automatically in the background, based on the maximum cleaning timer set for first party cookies and third party cookies. I can't think of a reason why someone would have their cookies automatically cleaned, but wants to keep Indexed DB since that can be used for tracking as well.

On-demand cleaning currently doesn't touch active tab content (#32), so the same logic could be used for background cleaning. That way, it won't inadvertently clean Indexed DB while still on the site (cleaning it while on the website should be reserved for on-demand cleaning).

Lusito commented 6 years ago

Either you missed the checkbox to clear local storage on domain leave (to the right of the cookies checkbox) or I'm unsure what exactly you are talking about.

Joel889 commented 6 years ago

I meant Indexed DB, I've edited the post.

Lusito commented 6 years ago

The indexed db cleaning API currently does not allow cleaning by domain. It doesn't allow me to see if there is any indexed db content. It might be possible in a very ugly way to inject into the webpage, but if you want that cleaned delayed, I would have to open that webpage in a hidden window, clean the data, and hope that the webpage won't write data within that request again.

So for now, I'm gonna have to pass on this request. Maybe in the future when web-extensions support cleaning by domain.

Joel889 commented 6 years ago

I understand there is no API. But why can't it "push" the on demand button automatically for me every X minutes, and act as if only Indexeded DB is selected for on demand cleaning? No need to worry about accidentally cleaning Indexed DB from active tabs, because on demand cleaning is already not removing Indexed DB from active domains.

Lusito commented 6 years ago

I can't confirm your claim that cleaning indexed db is protecting active tabs. I've used this sample and it got cleaned when I cleaned indexed db, while the url was still open: http://jsfiddle.net/unclelongmao/VrS32/

Joel889 commented 6 years ago

You are correct. I know it wasn't working for a while, so either 0.9.1 fixed it or I encountered a rare bug. Either way, that makes the approach presented here not feasible.

Lusito commented 6 years ago

I highly doubt this extension had anything to do with it.. maybe it was a firefox issue.