How to automatically delete your cookies every time you close your browser

Today's Best Tech Deals

Picked by PCWorld's Editors

Top Deals On Great Products

Picked by Techconnect's Editors

On Monday, Mozilla introduced a new Forget button to Firefox that makes it really easy to clean out your recent cookies and browsing history in one click.The new button gives you options to wipe out your history and cookies from the last 5 minutes, or 2 or 24 hours.

That's great if you feel the need to wipe out your history and cookies infrequently. But if you're trying to stymie online tracking cookies, you need a more permanent solution.

One way to defeat online tracking—at least a little bit—is to flush your cookies every time you shut down your browser.

If you do that companies will still be able to track your habits during your browsing session. But every time you shut down your browser and start it back up, you'll be starting fresh again.

This isn't a perfect solution since advertising companies will still track you during your browsing session. It also won't defeat items like Flash cookies or the controversial perma-cookie practices of AT&T and Verizon if you use a mobile broadband card from one of those companies.

It also means you'll have to login to sites and services (such as Facebook, Gmail, and others) every time you start the browser. 

But in my experience, flushing your cookies after a browsing session makes creepy targeted advertising far less consistent. It also has the added bonus of not requiring any third-party add-ons. Here's how to make it happen automatically in Chrome, Internet Explorer, and Firefox.


Click on the menu "hamburger" icon in the upper right corner and select Settings > Show advanced settings... > Privacy and then tap the Content settings button.

In the next window that opens, under Cookies, select the radio button that says "Keep local data only until you quit your browser."

Press Done at the bottom of the window, close the settings tab, and that's it.


Click on the "hamburger" icon in the upper right corner and select Options. Then in the window that opens, click on the Privacy tab. Under History, click the drop down menu next to "Firefox will:" and select Use custom settings for history.

A number of check boxes will automatically appear. Most of the defaults should be fine, but you want to change the drop down menu next to "Keep until." Change that setting to I close Firefox (i.e. keep cookies until I close Firefox).

As an option at the bottom of the history section, Firefox also lets you clear all your browsing history when you close Firefox, but that is not selected by default. Do so if you'd like.

Once you're done click OK and that's it. 

Internet Explorer

Automatically deleting cookies every time you shut down Internet Explorer isn't as obvious as it is with the other two browsers. To do so, click the gear icon in the upper-right corner and select Internet Options

Open the General Tab in the window that appears. Under the Browsing History section, check the box next to "Delete browser history on exit." If you'd like, you can click the Delete button underneath to customize exactly which settings are flushed every time you close IE, though cookies are wiped by default when you enable the "Delete browser history on exit" option.

Then click OK and you're ready to go!

Further reading

If you want to get more serious about online tracking beyond flushing your cookies every time you shut down, there are a number of third-party add-ons worth checking out, such as AdBlock Plus, Do Not Track Me, and the Electronic Frontier Foundation's Privacy Badger.

Note: When you purchase something after clicking links in our articles, we may earn a small commission. Read our affiliate link policy for more details.
Shop Tech Products at Amazon