Self-Destructing Cookies for Firefox

Martin Brinkmann
Jan 15, 2013
Updated • Aug 16, 2019
Firefox, Firefox add-ons

Cookies, small bits of data that Internet servers you connect to can place on your local computer, can be both beneficial and privacy-invasive depending on how they are used. Beneficial cookies store session data or preferences to preserve some information over sessions. Privacy-invasive cookies on the other hand are used by advertising companies and marketing firms to track you across the Internet.

A core issue in this regard is that cookies have an expiration data set by the server so that they may reside on the computer even after you have closed the website. While this may be beneficial at times, for instance if you visit the website regularly and do not want to log in every time you do so, it can as well reveal a lot about your surfing habits and be used to track you when you visit a site that is allowed to read the cookie.

There are a couple of things you can do to limit the privacy implications. You can for instance disable third party cookies in Firefox which blocks the majority of tracking related cookies from being set on the system.

You can also have Firefox delete all cookies but whitelisted ones on exit which is another interesting option to reduce cookie tracking.

Update: The original Self-Destructing Cookies is no longer available. Mozilla dropped Firefox's classic extensions system with the release of Firefox 57. A fork of the extension that supports the new extensions system has been released by another author. End

Self-Destructing Cookies

The Firefox add-on Self-Destructing cookies offers another interesting option. The extension removes cookies automatically from the system once you close the website that has set them on your system. This not only deletes tracking cookies regularly during sessions but also makes sure you are logged out of sites automatically which may improve security on multi-user systems.

A whitelist is provided that you can add websites to that you want ignored by the add-on so that its cookies remain on the system even after the website has been closed.

Cookies are deleted automatically after a grace period of 10 seconds, a value that you can change in the options. You receive a notification when cookies are removed.

The extension will delete all non-whitelisted cookies that have not been created by a site or server you are currently connected to in the browser. This can slow down Firefox for a short period of time.

The extension honors the whitelisting settings of the Firefox browser. To whitelist cookies press Alt, select Tools > Options, switch to privacy and click on the Exceptions button next to cookies.

You only see the exceptions button if you select "Use custom settings for history from the pulldown menu at the top.

Add domains, e.g. that you want cookies whitelisted for so that they are not deleted by the extension when you close the website they have been created on during connection.

firefox whitelist cookies

The settings of Self-Destructing Cookies lists options to disable notifications and to allow 3rd party tracking (which is disabled by default).


The Firefox add-on adds an interesting cookie-handling option to the browser. Its allow all and remove if not whitelisted approach makes it easy to use. While you may need to add a couple of domains that you visit regularly to the whitelist of the browser, its taking care of the bulk of cookies automatically for you.
software image
Author Rating
no rating based on 0 votes
Software Name
Self-Destructing Cookies WebEx
Software Category
Landing Page

Tutorials & Tips

Previous Post: «
Next Post: «


  1. GiddyUpGo said on July 17, 2017 at 12:08 am

    Firefox about:support shows “Multiprocess Windows” blocked by firefox extension SDC on my computer.
    I can find no way around this but to disable SDC.
    (W7 pro with Intel I7cpu, firefox 54.01).

  2. Thrawn said on April 26, 2017 at 4:37 am

    The author of SDC has stated on the FAQ ( that he doesn’t have time to rewrite it as a WebExtension. So, SDC is probably going away :(.

    And thus Mozilla snips another of my few remaining ties to Firefox.

    1. Rick A. said on June 6, 2017 at 2:01 pm

      @Thrawn – Here’s a web extension in case you don’t know about it but you probably do. and Martin’s article on that web extension

  3. Anon said on November 25, 2015 at 10:54 am

    @cezi, @Thrawn’s suggestion is outlined on the Sefl-destructing Cookies page. As it says, you can set Firefox to refuse all cookies and then set your semi-whitelisted (“Allow for session”) cookies to self-destruct when you close all their tabs. Type about:config in the URL field, accept the warning, right click on the background and pick add new, add the name extensions.jid0-9XfBwUWnvPx4wWsfBWMCm4Jj69E@jetpack.defaultBlock, and set to true. Do do a bit of research to check that this suggestion isn’t malicious first (-:.

  4. Constantin said on January 21, 2015 at 12:20 pm

    @Ruth, @witrak
    Can confirm that, too, at least for FF 35 running Linux.
    And apparently there’s no way of adding it to the toolbar again.

    Any solution?

    1. Ruth said on January 16, 2017 at 4:49 pm

      I’m still waiting for a solution too, Constantin.

    2. Martin Brinkmann said on January 21, 2015 at 1:01 pm

      Constantin check this article, maybe it ioffers a solution to your issue:

  5. witrak said on January 15, 2015 at 1:16 am

    @Ruth: I confirm that. The icon disappears after short time.

  6. Ruth said on May 1, 2014 at 1:15 am

    I’ve had self-destruction cookies for over one year now and love it. The only problem I have is that the icon will NOT stay on my toolbar. It keeps disappearing. I’ve tried all the suggestions to no avail. Anyone else have this problem?

  7. Trebuchette said on April 1, 2014 at 9:50 am

    I’d love a new review of SDCookies. I tried it some time ago and didn’t like it, but it now allows me to easily open the whitelists ( I can find to whitelist sites easily in FF 28), lets me set a time for *even those* to disappear (seconds to infinity, I suppose, as well as on events like browser close). It now also *clears your browser cache* when you’re idle a [set amount of minutes], which is very nice. So now I’m loving the crap out of this add-on! Really, I’d do another review of it.

    (I’ve never understood why these add-ons don’t combine a bit more, like SDC could add “and clear LSOs on close”. I suppose they’re slowly doing that, like ABP does some Ghostery things now, etc. But I suppose it’s good to have competition to make ‘the best’ and get the donation! :)

    1. Martin Brinkmann said on April 1, 2014 at 10:07 am

      Trebuchette, I will update this article once I find the time to do so ;)

  8. Thrawn said on November 25, 2013 at 1:47 am

    @cezi: You’re free to block all cookies by default; you don’t need any addon for that. However, if you do, then Self-Destructing Cookies has an experimental mode that will let you allow cookies for selected sites only while they have active tabs. Best of both worlds.

  9. Thrawn said on August 16, 2013 at 1:18 am

    The fact that Self Destructing Cookies automatically logs you out of sites when you leave
    is useful not just for multi-user systems, but also for preventing attacks like
    Cross-Site Request Forgery.

  10. Ken Saunders said on January 17, 2013 at 4:47 pm

    Interesting extension.
    I’ve used Cookie Monster for several years which gives me very good control over cookies.
    about:permissions is also decent for managing things.

  11. Pablo said on January 17, 2013 at 6:14 am

    I second the recommendation for CookieFast. So far, it’s the best of the many cookie add-ons I’ve tested on my Firefox. Simple, quick, effective. And, may I add?, worth a review, Martin ;)

    My complete current cookie management setup on Firefox is as follows:
    – On Firefox options (Tools -> Options -> “Privacy” tab): “Accept cookies from sites” UNTICKED. This prevents websites from storing cookies on my PC by default. I manage which (few) websites CAN store cookies via exceptions
    – CookieFast add-on: via a simple toolbar button, it allows me to quickly add a site to my whitelist (= list of sites that are allowed to store cookies). For 98% of the sites, I don’t have to do anything at all. For the other 2%, I add them to my whitelist via the CookieFast toolbar button in a second or two. Note that I only have to use the button the very first time I visit a site whose cookies I want/need to keep.
    – A couple of “helper” add-ons that make cookie management easier:
    “Cookie Manager Button”: adds a toolbar button to quickly access the cookie management window
    “CookieExFilter”: allows you to search cookie exceptions quickly and easily

    Overall, it’s a relatively simple setup that’s VERY low maintenance and gives me fine control over my Firefox cookies.

  12. DanTe said on January 16, 2013 at 9:33 pm

    I just gave it a 24 hours try out. Pretty good. It automatically wipes everything and logs me out once I leave a site. Kept the cookies as long as I was using it. I set the wipe timer to 60 seconds. Now if only there’s one for Android.

  13. DanTe said on January 16, 2013 at 9:32 pm

    I just gave it a 24 hours try out. Pretty good. It automatically wipes everything and logs me out once I leave a site. Kept the cookies as long as I was using it. I set the wipe timer to 60 secs. Now if only there’s one for Android.

  14. cezi said on January 16, 2013 at 8:48 pm

    This addon has the same silly approach as Yesscript — better is no to all attitude + user made exemptions for concrete trusted/important to user sites – session cookies-temporarily
    = CookieMonster + NoScript +for more refined rules RequestPolicy …..

  15. bill blagger said on January 16, 2013 at 8:21 pm

    Thanks Martin, sounds interesting. Looks new so might leave it a little longer and see how the ratings go.

  16. DanTe said on January 16, 2013 at 4:56 pm

    But I don’t want any cookies to be kept on my PC. I want them gone. Why put exceptions? Defeats the purpose.

  17. happysurf said on January 16, 2013 at 8:45 am

    CookieFast start setting Firefox for no accept cookie.
    When you visit an important site for you you can set that on exceptions list.
    When you do this for all personal web sites all is done.

  18. DanTe said on January 15, 2013 at 8:56 pm

    I would have to disagree with this. I think the Self Destructing Cookies would be a better use. Especially if one goes on to multiple sites all day long. The CookieFast requires the user to manually delete it. Might as well as save the ram load and just use Firefox’s built in history eraser.

  19. happysurf said on January 15, 2013 at 6:55 pm

    Interesting extension but in my opinion the most simple and effective is CookieFast:
    Great site Martin. :-)

  20. Daniel said on January 15, 2013 at 6:29 pm

    This sounds like an interesting add-on. Thanks for the spot!

    The only problem I see is in the lack of user comfort. When I use an add-on that cleans all cookies but those from my white-listed domains, I would expect there to be a better way to actually control said white-listed domains!

    There is no way, I would ever be able to keep this list up to date, if I’d need to keep going deep into the options for it (5 steps/clicks/key-presses: alt, tools, options, privacy, exceptions) every single time!

  21. Transcontinental said on January 15, 2013 at 3:00 pm

    I’ve installed Self-Destructing Cookies for Firefox yesterday, and it works just fine. Personally if I just call Firefox’s Page Info for the website I’m visiting to and, if applicable, set its cookie exception. Et voila.
    Transcontinental thinks this is good for you :)

  22. jNizM said on January 15, 2013 at 2:58 pm

    This add-on has been preliminarily reviewed by Mozilla.

  23. Nebulus said on January 15, 2013 at 2:58 pm

    Interesting extension, however at this moment I find the built-in capabilities of Firefox enough for my needs (coupled with having more than one profile, because I like to clean up Google cookies, but for my blog I need them, so I created a separate profile used just for blog administration).

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.