HomeDeveloper toolsStatic Asset Service Worker Builder

Static Asset Service Worker Builder

Generate a service worker that caches an explicit static asset list.

Processing stays in your browser. Caches only supplied paths and uses cache-first reads. List public static assets only. Register the generated worker over HTTPS and change the version when assets change.

How to use the static asset service worker builder

Generate a service worker that caches an explicit static asset list. Complete the same-origin asset paths json array, cache version name fields above, or upload a UTF-8 text file for same-origin asset paths json array. Choose Run tool, review the output, then copy or download the result.

Example

/icon.svg is cached at installation and served from that cache.

Good to know

Caches only supplied paths and uses cache-first reads. List public static assets only. Register the generated worker over HTTPS and change the version when assets change.