Skip to content

Websites had stored 3.3 GB in Chrome's service worker cache, and none of it shows as cache

Sites save offline copies through service workers, and clearing the browser cache does not touch them. Measured: 3.3 GB across 14 Chrome profiles.

5 min read

Clear Chrome's cache and you would expect the space back. On many Macs most of it stays, because the largest part of a profile is not the cache at all. It is storage websites asked for: service workers, IndexedDB and the file system API.

What a service worker stores

A service worker is a script a site installs so it can work offline and load instantly. It keeps copies of the site's pages, scripts and media in CacheStorage. Web apps such as mail clients, chat, documents and music players use it heavily, and so does any development server you have opened with a progressive web app setup.

In the default profile alone, Service Worker/CacheStorage was 968 MB and ScriptCache 27 MB.

Find it

cd ~/Library/Application\ Support/Google/Chrome
du -sh */Service\ Worker 2>/dev/null | sort -h | tail
du -sh Default/Service\ Worker/CacheStorage/* 2>/dev/null | sort -h | tail -5

The folders inside CacheStorage are named by hash, not by site. To see which site owns what, use Chrome itself.

Clear it per site

  1. Open chrome://settings/content/all.
  2. Sort by data stored. The biggest sites are at the top.
  3. Delete data for the ones you do not need offline.

Or, on a single site, open DevTools, the Application panel, then Storage, and use Clear site data. That removes service worker storage, IndexedDB and cookies for that one site, which will sign you out of it.

Profiles multiply it

Each Chrome profile has its own service worker storage, so a site used in five profiles is stored five times. Removing profiles you do not use is often the larger win, covered in Chrome taking up space. Safari and web apps saved to the Dock have the same mechanism, in Safari taking up space and progressive web apps.

Common questions

What is the Service Worker folder in Chrome?

It holds offline copies websites saved through service workers so they can load without a connection. On the Mac measured it was 3.3 GB across 14 profiles.

Does clearing Chrome's cache clear service worker data?

No. Service worker storage is site data. Clear it per site at chrome://settings/content/all, or with Clear site data in DevTools.

Is it safe to delete Chrome's Service Worker folder?

Yes with Chrome quit, but sites lose their offline copies and some may sign you out. Clearing per site is more precise.

Why is service worker storage so large?

Web apps cache pages, scripts and media for offline use, and each Chrome profile keeps its own copy.

Read next