Rayquaza01 / HistoryCleaner

Firefox addon that deletes history older than a specified amount of days.
MIT License
78 stars 6 forks source link

Clean cache? #31

Closed Menalix closed 5 months ago

Menalix commented 5 months ago

I wondered if it could be possible to do the same with cache files? so if the website haven't had a visit for more than specificied duration it will clean up all cache files related to it?

Rayquaza01 commented 5 months ago

Duplicate of #13

The WebExtension API to clear the cache is browsingData. With the browsingData APIs, you can only clear recent cache, cookies, history, etc.. There is no API to clear old cache like there is for history.

If you want to clear recent browsing data, there is a menu for this built into the browser. See Delete browsing, search and download history on Mozilla Support

Cookie AutoDelete might accomplish something similar to what you want. Along with cookies, you can configure CAD to clear other browsing data automatically. CAD uses a whitelist instead of expiration, so all cookies and other browsing data will be deleted for non-whitelisted sites.

I know you didn't mention cookies specifically, but for completeness, there is also an extension called Fresh Cookies which clears old cookies after an expiration.

Hope this helps!