Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

Cookie and history deletion options/mechanism

  • 2 个回答
  • 0 人有此问题
  • 1 次查看
  • 最后回复者为 cor-el

more options

I want to: - Delete cookies, logins and cache of all not specifically allowed websites when closing the browser - Automatically delete the browser history of anything thats older than 'n' days or entries - Preferably do this without having to use an addon

I have set places.history.expiration.max_pages, however even on a really low value it does not seem to delete any older items from the history.

For deleting cookies and cache I have a problem understanding how the 2 sections in the settings interact (Cookies and Site Data and History) and how I would manage to delete everything except the whitelisted cookies.

I want to: - Delete cookies, logins and cache of all not specifically allowed websites when closing the browser - Automatically delete the browser history of anything thats older than 'n' days or entries - Preferably do this without having to use an addon I have set ''places.history.expiration.max_pages'', however even on a really low value it does not seem to delete any older items from the history. For deleting cookies and cache I have a problem understanding how the 2 sections in the settings interact ('''Cookies and Site Data''' and '''History''') and how I would manage to delete everything except the whitelisted cookies.

所有回复 (2)

more options

Hi bachlordofthedings,

I am pretty sure the function you want is not implemented in Firefox yet. If you want to leave feedback for developers, you can go to the Firefox Help menu and select either Share ideas and feedback… or Submit feedback…, depending on your Firefox version. Alternatively, you can use this link. Your feedback gets collected by a team of people who read it and gather data about the most common issues.

You can also file a bug report or feature request. See File a bug report or feature request for Mozilla products for details.

more options

There is no built-in way to let only older history expire when you close Firefox or otherwise as there is only "Clear Recent History" to specify a time range for what to delete.

You can look at the 'Expire history by days' extension, created by one of the Firefox developers.

Clearing history selectively can be done via PlacesUtils.history.removeVisitsByFilter().


You can check that you aren't clearing important cookies.

  • using "Delete cookies and site data when Firefox is closed" to clear cookies keeps cookies with an allow exception
    in 102+ version toggling this setting makes changes to the "Clear history when Firefox closes" settings and those settings prevail
  • using "Clear history when Firefox closes" in Firefox 102+ honors exceptions and keeps cookies with an allow exception, previous versions removed all cookies

Make sure to keep the "Site settings".

  • clearing "Site settings" clears exceptions for cookies, images, pop-up windows, and software installation and exceptions for passwords and other website specific data