Temporary-containers: [Enhancement] Remove container history on deletion

Created on 9 Jan 2018  路  15Comments  路  Source: stoically/temporary-containers

I'd like to use this as a full replacement for Private Tab, but the history sticking around makes clean-up annoying. It would be nice if you could set history to be deleted for a temporary container.

enhancement firefox api limitation

Most helpful comment

Just published version 0.29 with Delete History feature. Hope you like it. Please let me know if something doesn't work as expected.

All 15 comments

Hi, unfortunately this is currently not supported by Firefox, history entries don't have a tabid or containerid. If it gets supported one day I'll happily implement it too.

I've opened this to see if they give any feedback: https://github.com/mozilla/multi-account-containers/issues/1096 .

If they don't reply soon, at least consider deleting history entries created for websites entered in the "Always per Website" option of your extension, in the same fashion as https://addons.mozilla.org/addon/historia/ . It constantly monitors the history to delete all URLs you specify, but to make it use less resources, you could make it clean up the history only after the last temporary container is closed.

I could add a way to automatically delete history like Historia does - by default it only listens to the history.onVisited event and removes the HistoryItem immediately if one of the added domain patterns matches. That's already light on resources. The patterns could indeed be the ones added to "Always per Website".

Or I could add a preference to automatically remove all urls from history that got opened in a temporary container.

But in both cases it would affect the complete history, not only the history of temporary containers - so you could end up deleting history that you actually wanted to preserve - so I'm not exactly sure if I want to add such a feature until it's officially supported, especially since there's already the Historia Add-on that can do the job just fine.

After thinking about it a bit - here's what I plan to implement.

image

image

Just published version 0.29 with Delete History feature. Hope you like it. Please let me know if something doesn't work as expected.

The cleanup doesn't work if you disable "Automatic Mode" and use the Alt + P shortcut on Firefox 58.0.1.

Can you add an option to use no-history containers with the extension button and context menu too?

Ooops. Thanks for letting me know. Just published version 0.30 with the fix. Lets just pretend 0.29 never happened. 馃槵

Yeah, the toolbar icon and context menu should open deletes-history containers too when the "Automatically create" configuration under advanced is set. I'll fix that in the next version.

The fix worked, but Firefox asked me to give it permission to access the history again after the update. Maybe there's a bug that causes that when one first allowed access to something using the method you used in the Advanced pane?

Yeah, happened to me too. Seems to be an issue with Firefox; updates after that don't ask for the permission anymore. But I guess it's not too bad because it will only happen to people that explicitly wanted to give that permission anyway.

Another thing I just noticed - clearing history for a site isn't enough to prevent that it pops up as suggestion in the address bar (have to select it and click del) and the omnibox API doesn't have a way to delete something. That's kind of a bummer. Scratch that. Looks like I had old data in the history. Seems to work just fine.

I was going to report this to Bugzilla, but then saw that you've deleted 0.29.

The problem is that after an automatic update users may dismiss the popup without reading it (and then have the extension disabled or stuck in an old version), or people may just start accepting all requests from all extensions without thinking twice (https://palant.de/2016/07/02/why-mozilla-shouldn-t-copy-chrome-s-permission-prompt-for-extensions), so the fewer times the permissions popup appear, the better.

Hopefully your users will be more careful, but fixing this problem would be good for Firefox extensions in general.

Yeah, I've deleted the version as soon as I saw your report and started fixing after that. But just published 0.31 with the fix for the "Automatically create" thing. So if you'd want, you could report now. That'd be great, thanks!

I guess you're absolutely right and the article makes sense. Also I didn't know that Add-ons stop updating if you reject a permission prompt, that's bad indeed.

In case you report the bug, could you post the link here? Or let me know if you ain't got the time to do so. After your explanation I think it actually is important to report.

Awesome, thanks.

Just published 0.32 with a note about that bug including the link in the advanced preferences.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AdKiller picture AdKiller  路  4Comments

mkruer picture mkruer  路  5Comments

r-a-y picture r-a-y  路  4Comments

anonymous133 picture anonymous133  路  6Comments

Decopi picture Decopi  路  4Comments