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

Clear Recent History and whitelisting cookies #99

Closed rbro closed 5 years ago

rbro commented 6 years ago

Thanks for a useful extension. I've been looking for an extension that would do the equivalent of going to History - Clear Recent History, and would delete the entire history except for certain whitelisted cookies. I used to use the extension biscuit (https://addons.mozilla.org/en-US/firefox/addon/biscuit-220876), but I don't believe that Firefox WebExtensions allow you to intercept the deletion of cookies when you do Clear Recent History like Biscuit did. Is that what you have found too?

My other question is - and this might be obvious - but just wanted to confirm:

Is checking all boxes on the "Manual cleanup" tab the equivalent of going to Clear Recent History, Time Range = Everything, and checking all boxes (besides preserving whitelisted cookies of course)?

Thanks for your help.

Lusito commented 5 years ago

I'm sorry, I overlooked this issue, I must have looked at the title and thought it was a question I already answered.

but I don't believe that Firefox WebExtensions allow you to intercept the deletion of cookies when you do Clear Recent History like Biscuit did. Is that what you have found too?

FMN can't intercept cookie deletion when you use Firefox's clear history button. But you can use FMN to clear history. And in that case, cookies which you whitelisted will be protected by FMN.

Is checking all boxes on the "Manual cleanup" tab the equivalent of going to Clear Recent History, Time Range = Everything, and checking all boxes (besides preserving whitelisted cookies of course)?

This is a tricky one.. I can't honestly answer this with 100% confidence, as I don't know the internals of Firefox, but from my understanding: If you check all checkboxes on the manual cleanup tab AND uncheck the "Apply Rules" checkboxes, then it should be the same. It is important to note, that checking the "apply rules" will protect your cookies and local storage if you whitelisted them.

I hope this answers your questions.

rbro commented 5 years ago

Thanks, appreciate your help. I've been using it the past few weeks and all is working great as a replacement for "Clear Recent History". I am running it with all checkboxes checked except for 'Protect currently open domains if "Apply Rules" is checked'.

I have noticed one side effect which isn't an issue for me, but if you were interested:

It doesn't seem like the cache for "Allow Notifications" is cleared out with your extension.

As an example, go to https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API, and click "Allow Notifications".

If you now do "Clear Recent History" and go to that URL again, you get prompted again to accept the notifications, but if you do the manual cleanup via your extension, you don't get prompted, so I'm guessing they aren't being cleared.

If there is a way to clear these too, maybe this could be another checkbox on the Manual Cleanup tab?