diff --git a/sw-config.js b/sw-config.js index 6e2d6a4..1e41b4a 100755 --- a/sw-config.js +++ b/sw-config.js @@ -34,7 +34,11 @@ module.exports = { ], runtimeCaching: [ { - urlPattern: /^https:\/\/((matomo\.silas\.link)|(www\.googletagmanager\.com)|(apis\.google\.com)|(.*\.googleusercontent\.com)|(.*\.google.com)|(cdn.jsdelivr.net)).*$/, + urlPattern: /^https:\/\/((matomo\.silas\.link)|(www\.googletagmanager\.com)|(apis\.google\.com)|(.*\.googleusercontent\.com)|(.*\.google.com)).*$/, + handler: "networkOnly" + }, + { + urlPattern: /^https:\/\/((cdn.jsdelivr.net)).*$/, handler: "networkFirst" }, { @@ -45,25 +49,18 @@ module.exports = { { urlPattern: /^.*\/cached\/.*$/, handler: "networkFirst" - // handler: "networkFirst" }, - // { - // urlPattern: /^.*\/img\/icons\/.*$/, - // handler: "networkFirst" - // }, { urlPattern: /^.*\/(version)\/.*$/, handler: "cacheFirst" }, { urlPattern: /^https:\/\/((www\.codecogs\.com)|(latex\.codecogs\.com)).*$/, - // handler: "cacheFirst" handler: "networkOnly" }, { urlPattern: /^.*$/, handler: myHandler - // handler: "networkFirst" }], maximumFileSizeToCacheInBytes: 14194304 };