Updated sw-precache
This commit is contained in:
parent
f4e477d03c
commit
173908e504
13
sw-config.js
13
sw-config.js
@ -34,7 +34,11 @@ module.exports = {
|
|||||||
],
|
],
|
||||||
runtimeCaching: [
|
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"
|
handler: "networkFirst"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -45,25 +49,18 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
urlPattern: /^.*\/cached\/.*$/,
|
urlPattern: /^.*\/cached\/.*$/,
|
||||||
handler: "networkFirst"
|
handler: "networkFirst"
|
||||||
// handler: "networkFirst"
|
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// urlPattern: /^.*\/img\/icons\/.*$/,
|
|
||||||
// handler: "networkFirst"
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
urlPattern: /^.*\/(version)\/.*$/,
|
urlPattern: /^.*\/(version)\/.*$/,
|
||||||
handler: "cacheFirst"
|
handler: "cacheFirst"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
urlPattern: /^https:\/\/((www\.codecogs\.com)|(latex\.codecogs\.com)).*$/,
|
urlPattern: /^https:\/\/((www\.codecogs\.com)|(latex\.codecogs\.com)).*$/,
|
||||||
// handler: "cacheFirst"
|
|
||||||
handler: "networkOnly"
|
handler: "networkOnly"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
urlPattern: /^.*$/,
|
urlPattern: /^.*$/,
|
||||||
handler: myHandler
|
handler: myHandler
|
||||||
// handler: "networkFirst"
|
|
||||||
}],
|
}],
|
||||||
maximumFileSizeToCacheInBytes: 14194304
|
maximumFileSizeToCacheInBytes: 14194304
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user