I have a very useful plugin that automatically deletes website data (other than history and downloads) after a configured interval once you’ve closed the tab or window. You can define an exception list. I cannot recall its name, I’ll post back when I’m back at my computer.
Actually, sorry, it seems to be https://addons.mozilla.org/en-US/firefox/addon/temporary-con... and https://github.com/GodKratos/temporary-containers) based solely on the language present in the add-on and commit history