为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

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

详细了解

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