Sunday, June 22, 2008

Mozilla Firefox 3: How To Selectively Retain & Delete Cookies in Firefox 3

Selectively retaining and deleting cookies in Mozilla's newly released Firefox 3 allows you to maintain privacy around your browser sessions by eliminating browsing trails and removing sensitive information and passwords, and permitting you to retain only a few useful cookies such as ones for Google, news sites that you frequent; social networking sites like Digg, Facebook, and Flickr and web utilities such as Statcounter and more.



Firefox 3.0 doesn’t seem to have a ‘Delete all cookies except the following’ feature under a fancy button entitled ‘Delete all cookies except the following feature’. But here is the way to do it without installing any add-ins or extensions:



First of all - set up the 'Private Data' feature of Firefox 3 in the following way. This will allow you to delete your Browsing History, Download History, Saved Form Information, Cache, Cookies, Saved Passwords and Authenticated Sessions - either on demand (i.e. by clicking the 'Clear Now' button) or when 'I close Firefox'.







I set my privacy settings on Firefox to clear the following data elements when closing (see image below):


  • browsing history

  • download history

  • saved form information

  • cache

  • authenticated sessions


Leave the following unchecked:


  • Cookies

  • Offline Website Data

  • Saved Passwords






Before I figured this out, when I needed to log into Gmail, maintain my Google search preferences, keep my Digg.com or New York Times, or Blogger login active, I had to re-submit my credentials each time, if I wanted to clear all my private data.



Select the Options feature from the Tools option in the File Menu, and under the Privacy region, look at the Cookies and the Private Data regions.



Check the checkbox 'Accept cookies from sites', and select 'keep until I close Firefox' in the drop-down beneath it. Then check the checkbox 'Always clear my private data when I close Firefox'.







Now, here’s the good part. The Exceptions button beside the ‘Allow sites to set Cookies’ option contains the important elements. The dialogue box reads 'You can specify which web sites are always or never allowed to use cookies. Type the address of the site you want to manage and then click Block, Allow for Session, or Allow.' (see image below)







I exclude the subdomains and just use the root domain - i.e. only type google.com and not mail.google.com, reader.google.com, maps.google.com, etc...







I have added several domains for which I wish to have the cookies retained on my system, and you will see how I am adding ‘lifehacker.com’ to my list. Choose ‘Allow’ to add this domain to your list, and then click ‘Close’. Then click ‘Okay’ on your Options window, and then exit out of Firefox.



Once you open it again, you will be able to visit the sites for which you have allowed cookies to be retained and you won’t need to log in again - i.e. the cookies remain, while all others are deleted or erased on closing Firefox.









If you find this useful, or have some corrections - feel free to use the comment feature at the bottom of this post.



If you've enjoyed this pot, here is a list of some of the most popular posts on Mungo Says Bah!