As hinted in Paranoid cookie management, Firefox offers very fine-grained cookie management capabilities compared with some other browsers.
To turn on fine-grained cookie management in Firefox:
- Make sure the Accept cookies from sites option is checked in the Privacy tab of Preferences (on Unix or Linux) or Options (on MS Windows).
- Set the Keep until: drop-down list to ask me every time.
Once you do this, every time a site tries to give your browser a cookie, you will be asked to decide whether to accept or deny the cookie, and how long it should be kept. You will have three options for how to deal with the cookie:
- Click Allow to allow the cookie as normal, as though the drop-down list option you selected was they expire instead of ask me every time.
- Click Allow for Session to ensure the cookie will be accepted, but will then be cleared as though the drop-down list option you selected was I close Firefox instead of ask me every time.
- Click Deny to ensure the cookie is not accepted on your computer at all.
A checkbox allows you to decide whether this choice will be used for all cookies that specific domain tries to give you or just this one specific cookie. Make sure you check or uncheck the box as desired before clicking the Allow, Allow for Session, or Deny button.
It doesn’t get any more automated than that with built-in Firefox functionality, though; there are no auto-accept or auto-deny rules you can set based on any criteria other than whether it is a cookie for a specific domain. At the moment, Web browsers simply do not offer stateful firewall-style filtering rules. The main consequence of this is that it places more of the weight of cookie management on the shoulders of the user who wants fine-grained control.
A number of cookie management extensions exist, which can provide tools that are easier to use for ensuring you accept the cookies you want and deny those you don’t. One that I have used for a while now, and tend to like in general, is called Cookie Whitelist, With Buttons. I use it to smooth over some of the rough spots in ease of use for the Firefox built-in cookie management capabilities so that I can get more fine-grained control without having to sacrifice too much time to the gods of micro-management. Getting the workflow of cookie management with Firefox fine-grained controls and Cookie Whitelist, With Buttons down pat, so that things run perfectly smoothly, takes some familiarity with the tools. If you do not want to learn a new (but not terribly complex) skill, this may not be for you.
Of course, after a while, using the fine-grained control Firefox offers just kind of fades into the background so that it no longer seems to take up any time in particular, even without an extension to help out. The major wart on the Firefox cookie management interface is its Exceptions... button, which is used to make changes to the per-domain cookie management rules you have selected when clicking one of those three buttons on the Confirm setting cookie dialog. There isn’t really any functionality in the cookie policy exceptions interface that could be called a useful “search” capability, which means that when you accidentally deny something you should have accepted you’re going to have to basically parse the list by eye to find the cookie you need to unblock.
Once upon a time, I wrote a simple program to handle my cookie policy exception searches for me, and it provided fairly robust searching capabilities for such a small tool. The fact the cookie policy exceptions were stored in a plaintext file made it absurdly easy. As of Firefox 3.0, however, the cookie policy exceptions are now stored in an SQLite file, breaking my search utility. Alas, I have not gotten around to writing a new version of the tool, and the hope that I may be able to start using Chromium (the open source browser on which Google Chrome is based) as my primary browser has not motivated me to get to work on an updated search tool.
I do not know of any Firefox extensions that provide similar search capabilities, so that wart on Firefox cookie management functionality remains. Even without that search capability, I still find the benefits of fine-grained control with Firefox outweigh the detriments. Your mileage, as always, may vary.