Updated sw-precache

This commit is contained in:
silas 2018-10-31 11:10:50 +01:00
parent f4e477d03c
commit 173908e504

View File

@ -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
};