Modern Chrome Web Extension and Firefox Browser Addon to easily clean selected cache items specific sites or the whole browser with a single key press, from the right-click context menu or via the toolbar icon popup. Cache cleaner is also available for mobile browsers, see Install below.
Firefox does not have an API to clear cache storage, the cache created by service workers. Furthermore, it has no
option to bypass the service worker for network when testing. This extension resolves that issue by using a custom
function to clear Cache Storage when clearing site cache plus has an option automatically reload the page after
clearing the cache. Now after making a change to a site with a service worker, all you have to do is press F4
(default
keybind to clear cache) to clear the cache and refresh the site. Additionally, the browsing data API differs on Firefox
and Chrome so logic was added to allow the extension to run on both browsers.
More information on the individual APIs for Firefox and Chrome.
All Chromium Based Browsers can install the extension from the Chrome Web Store.
Mobile browser support available for Firefox, Yandex and Kiwi.
- Clear cache and reload site with a single key or button press
- Choose which cache items to clear or clear all data
- Clear cache for a specific site or the whole browser
- Option to clear Cache Storage in Firefox for individual sites
- Works in both Firefox and Chromium based browsers
- Custom time frames to clear supported caches
- Chrome only, option to exclude specified origins
Tip
Don't see your feature here? Request one on the Feature Request Discussion.
- No major issues detected at the moment...
Tip
Don't see your issue here? Open one on the Issues.
You can pin the Addon by clicking the Puzzle Piece
, find the Cache Cleaner icon, then;
Chrome, click the Pin
icon.
Firefox, click the Settings Wheel
and Pin to Toolbar
.
To open the options, click on the icon (from above) then click Open Options
.
You can also access Options
through the right-click context menu (enabled by default).
Use the extension in one of the three following ways:
- Click on the Toolbar Icon and using the Popup
- Set Keyboard Shortcuts for Clearing Cache or Activating the Popup
- Using the Right Click Context Menu (configurable from Options Page)
For help using the web extension, see:
- Q&A Discussion: https://github.com/cssnr/cache-cleaner/discussions/categories/q-a
- Request a Feature: https://github.com/cssnr/cache-cleaner/discussions/categories/feature-requests
If you are experiencing an issue/bug or getting unexpected results, you can:
- Report an Issue: https://github.com/cssnr/cache-cleaner/issues
- Chat with us on Discord: https://discord.gg/wXy6m2X8wY
- Provide General Feedback: https://cssnr.github.io/feedback
Logs can be found inspecting the page (Ctrl+Shift+I), clicking on the Console, and; Firefox: toggling Debug logs, Chrome: toggling Verbose from levels dropdown.
To support this project, see the Contributing section at the bottom.
Quick Start
First, clone (or download) this repository and change into the directory.
Second, install the dependencies:
npm install
Finally, to run Chrome or Firefox with web-ext, run one of the following:
npm run chrome
npm run firefox
Additionally, to Load Unpacked/Temporary Add-on make a manifest.json
and run from the src folder, run one of
the following:
npm run manifest:chrome
npm run manifest:firefox
Chrome: https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world#load-unpacked
Firefox: https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox/
For more information on
web-ext, read this documentation.
To pass additional arguments to an npm run
command, use --
.
Example: npm run chrome -- --chromium-binary=...
Install the requirements and copy libraries into the src/dist
directory by running npm install
.
See gulpfile.js for more information on postinstall
.
npm install
To create a .zip
archive of the src directory for the desired browser run one of the following:
npm run build
npm run build:chrome
npm run build:firefox
For more information on building, see the scripts section in the package.json file.
- Build or Download a Release.
- Unzip the archive, place the folder where it must remain and note its location for later.
- Open Chrome, click the
3 dots
in the top right, clickExtensions
, clickManage Extensions
. - In the top right, click
Developer Mode
then on the top left clickLoad unpacked
. - Navigate to the folder you extracted in step #3 then click
Select Folder
.
- Build or Download a Release.
- Unzip the archive, place the folder where it must remain and note its location for later.
- Go to
about:debugging#/runtime/this-firefox
and clickLoad Temporary Add-on...
- Navigate to the folder you extracted earlier, select
manifest.json
then clickSelect File
. - Optional: open
about:config
search forextensions.webextensions.keepStorageOnUninstall
and set totrue
.
If you need to test a restart, you must pack the addon. This only works in ESR, Development, or Nightly. You may also use an Unbranded Build: https://wiki.mozilla.org/Add-ons/Extension_Signing#Unbranded_Builds
- Run
npm run build:firefox
then useweb-ext-artifacts/{name}-firefox-{version}.zip
. - Open
about:config
search forxpinstall.signatures.required
and set tofalse
. - Open
about:addons
and drag the zip file to the page or choose Install from File from the Settings wheel.
Currently, the best way to contribute to this project is to give a 5-star rating on Google or Mozilla and to star this project on GitHub.
Other Web Extensions I have created and published:
- Link Extractor
- Open Links in New Tab
- Cache Cleaner
- Auto Auth
- HLS Video Downloader
- SMWC Web Extension
- PlayDrift Extension
- ASN Plus
- Aviation Tools
- Text Formatter
For a full list of current projects visit: https://cssnr.github.io/