This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

ابحث في الدعم

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How can I delete cache and cookies, but keep history, every time I close Firefox?

  • 3 ردود
  • 1 has this problem
  • 27 views
  • آخر ردّ كتبه cor-el

more options

Under Privacy and Security I have Firefox set to 'Delete cookies and site data when Firefox is closed' with no exceptions listed.

When I close and reopen Firefox, the cookies are correctly deleted, but the cache is not. I have to manually go into this setting to delete them. This also happens if I go to the menu bar setting of 'history/clear recent history'.

I want to keep my history of where I've been, but clear clear cookies and the cache every time close.

This doesn't seem like an unreasonable request for a browser that bills itself as being privacy oriented, but I don't see how to do this. Doing banking, I have to manually go into Privacy each time to get this done to clear the site.

From looking at previous answers to this question it seems the current way Firefox is designed this is "not a bug, but a feature".

Using Firefox 99.0 on a 2017 Imac.

Under Privacy and Security I have Firefox set to 'Delete cookies and site data when Firefox is closed' with no exceptions listed. When I close and reopen Firefox, the cookies are correctly deleted, but the cache is not. I have to manually go into this setting to delete them. This also happens if I go to the menu bar setting of 'history/clear recent history'. I want to keep my history of where I've been, but clear clear cookies and the cache every time close. This doesn't seem like an unreasonable request for a browser that bills itself as being privacy oriented, but I don't see how to do this. Doing banking, I have to manually go into Privacy each time to get this done to clear the site. From looking at previous answers to this question it seems the current way Firefox is designed this is "not a bug, but a feature". Using Firefox 99.0 on a 2017 Imac.

All Replies (3)

more options

Hello, you can let the cookies expire when Firefox is closed to make them session cookies instead of using "Clear history when Firefox closes" to clear all cookies including cookies with an allow exception you may want to keep. Options/Preferences -> Privacy & Security Cookies and Site Data: [ ] "Delete cookies and site data when Firefox is closed" You can create a cookie allow exception with the proper protocol (https:// or http://) for websites you want to remember you. Options/Preferences -> Privacy & Security Cookies and Site Data: "Exception" Note that you only keep cookies with an allow exception if you use "Delete cookies and site data when Firefox is closed". Deleting cookies otherwise removes all selected cookies.

more options

This doesn't solve the problem. The cookies disappear but the 'cached web content' - which is what I want gone when I close Firefox remain. Checking 'Delete cookies and site data when Firefox is closed' just doesn't work.

more options

You can use "Delete cookies and site data when Firefox is closed" to clear the cookies if you want to keep cookies with an allow exception.

For the browsing cache you can use "Clear history when Firefox closes". Note that using "Clear history when Firefox closes" to clear the cookies also clears cookies with an allow exception and clearing the Site Preferences clears all the exceptions.

  • clearing "Site Preferences" clears exceptions for cookies, images, pop-up windows, and software installation and exceptions for passwords and other website specific data
  • clearing "Cookies" via "Clear history when Firefox closes" will remove all cookies including cookies with an allow exception like cookies for websites to remember you that you may want to keep