Selectively delete cookies in Firefox

When developing websites or testing stuff I sometimes need to be able to delete cookies in my web browser. Session cookies can be dropped by simply shutting down the web browser and starting it up again, but if their expiry is set sometime into the future it is possible to delete in some web browsers yourself. This post shows how to selectively delete a cookie in the Firefox version 2 web browser.

What is a cookie?

A cookie is small piece of information transmitted between a web browser and web server to help identify you so each page request can be related to the last, and for other tracking purposes to remember you when you come back to a site, or to set personal preferences etc.

Selectively deleting cookies in Firefox 2

You can delete a single cookie in Firefox 2 (or more of course) by selecting “Edit” and then “Peferences” or “Tools” and then “Options” from the main menu (the exact menu structure can vary depending on operating system). You will then see an “Options” window like the one below. Click the “Privacy” button to get to the same options page as show below.

firefox options dialog

To see which cookies are set, click the “Show cookies” button. This is highlighted with a red box in the above screenshot. Clicking it will show a window like the one below. At first it will show a list of domains that cookies have been set from with a + to expand them like a folder structure. You can then click on the cookie you want to view.

Alternatively, you can start typing into the “Search” box (highlighted in red in the screenshot below) and it will only show cookies that match the search term. It will match domain names, cookie names and cookie values. The example below shows me searching for cookies that match “phpmyadmin”.

deleting a single cookie in firefox

After you have clicked on a cookie, it will show the cookie name, content, host, path, connection type and when it expires in the bottom part of the window. You can then click the “Remove Cookie” button to delete the selected cookie. The remove cookie button is highlighted with a blue box in the above screenshot.

You can also select multiple cookies by control+clicking or shift+clicking and click the “remove cookie” to remove all those selected.