搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

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