Automatically Clear Firefox Cookies and Site Data on Exit

This article provides a quick, step-by-step guide on how to configure the Mozilla Firefox web browser to automatically delete all cookies and site data every time you close the application. By enabling this built-in privacy feature, you can prevent websites from tracking your browsing habits across sessions and ensure your local data is wiped clean automatically. Below, you will find the exact steps to activate this setting, how to create exceptions for websites you trust, and how to verify your history settings to ensure complete data removal.

Enable Automatic Deletion

To make Firefox delete your cookies and site data upon closing, follow these steps:

  1. Open the Menu: Launch Firefox and click the menu button (three horizontal lines) located in the top-right corner of the browser window.
  2. Open Settings: Click on Settings from the drop-down menu.
  3. Go to Privacy & Security: On the left-hand sidebar, select the Privacy & Security panel.
  4. Find Cookies and Site Data: Scroll down the page until you reach the Cookies and Site Data section.
  5. Activate the Feature: Check the box next to Delete cookies and site data when Firefox is closed.

This change saves automatically. Going forward, every time you completely quit the Firefox browser, all cookies and site data collected during that session will be erased.

Add Exceptions for Trusted Websites

Deleting all cookies means you will be logged out of all your accounts every time you close the browser. If there are specific websites where you want to remain logged in, you can add them as exceptions:

  1. In the Cookies and Site Data section, click the Manage Exceptions... button located to the right of the checkbox you just enabled.
  2. Type the exact URL of the website you want to keep data for into the Address of website field.
  3. Click the Allow button.
  4. Click Save Changes at the bottom right of the window.

Firefox will now keep the cookies for the websites on this list while deleting everything else when you close the browser.

Verify Custom History Settings

If you have previously modified your Firefox history settings, they might conflict with the standard cookie deletion tool. To ensure everything deletes properly:

  1. Stay in the Privacy & Security panel and scroll down to the History section.
  2. If the drop-down menu is set to Remember history, no further action is needed.
  3. If the drop-down menu is set to Use custom settings for history, ensure the box for Clear history when Firefox closes is checked.
  4. Click the Settings... button next to that checkbox.
  5. Under the History and Data sections, make sure Cookies and Site settings (or Offline Website Data) are checked, then click OK.