Self-Destructing Cookies automatically removes cookies when they are no longer used by open browser tabs.
A nifty little add-on for the FireFox browser, Self-Destructing Cookies automatically cleans your cookie jar, just leaving the cookies you want.
It’s a minor hassle setting up the whitelist for allowed sites, but I think it’s worth taking the addon out for a spin. By the way: when I activated it, there were 2921 cookies and 673 LocalStorage scopes removed.
Get it from the FireFox extensions: Self-Destructing Cookies.