Nearly every website wants to place a cookie on your computer. But some websites you return to often, and some other websites you visit once and forget about them.
If you don't take control of your cookies, you can easily end up with thousands of them taking gigs of your disk space. And then there's privacy reasons.
To have this sustainably under control, you will have to address these two issues:
- Regularity. Cookies need to be cleared regularly. A good way to automate this would be having your browser delete all cookies on exit, so every time you restart your browser or shut down your computer.
- Convenience. If you delete all cookies, you will get signed out of the sites you do use. Since more and more websites require two-factor authentication with all kinds of cross-device confirmation prompts, and this creates inconvenience, or even risks of being locked out of a site you need now at the worst possible time. So you will have to create exceptions, thus making sure cookies from the sites you trust and/or need often won't get cleared.
Firefox
Go to Settings → Privacy & Security → Cookies and Site Data. Once there,
- Under Manage Data, delete data from the sites you don't need anymore – or simply from all sites.
- Under Manage Exceptions, manually add an exception for every site data from which you want to keep.
Chrome
The old option to Clear cookies and site data when you quit chrome has been moved and buried deep in Settings → Privacy and security → Site settings → Additional content settings → On-device site data. Alternatively, type chrome://settings/content/siteData
into address bar. Once there,
- Set Chrome to delete everything when you close it by choosing:
Delete data sites that have been saved to your device when you close all windows Sites will probably work as you expect but won't remember you after you close all Chrome windows
- Manually add the websites you need often under Allowed to save data on your device using the format
[*.]example.com
to account for the possible subdomains
As a result, you get the best of both worlds: the garbage is cleared, while your required cookies are kept.