diff --git a/src/service-worker.js b/src/service-worker.js index c3e53cb8..5518fe5d 100644 --- a/src/service-worker.js +++ b/src/service-worker.js @@ -28,7 +28,7 @@ const ON_DEMAND_CACHE = [ cache: WEBPACK_ASSETS }, { - regex: /icon-.*?\.png/, + regex: /\/icon-.*?\.png/, cache: ASSETS } ] @@ -41,7 +41,7 @@ const assets = __assets__ .filter(filename => !filename.endsWith('.webapp')) // KaiOS manifest .filter(filename => !/emoji-.*?\.json$/.test(filename)) // useless to cache; it already goes in IndexedDB .filter(filename => !/screenshot-.*?\.png/.test(filename)) // only used during PWA installation, don't bother caching - .filter(filename => !/icon-.*?\.png/.test(filename)) // cache app icons on-demand + .filter(filename => !/\/icon-.*?\.png/.test(filename)) // cache app icons on-demand (but not favicon) // `shell` is an array of all the files generated by webpack // also contains '/index.html' for some reason