diff --git a/source/js/sw.js b/source/js/sw.js index 7f1227b..8c9877e 100644 --- a/source/js/sw.js +++ b/source/js/sw.js @@ -53,6 +53,23 @@ routing.registerRoute( }) ); +routing.registerRoute( + /.*blog\.nofated\.win/, + new CacheFirst({ + cacheName: 'static-immutable' + cacheSuffixVersion, + fetchOptions: { + mode: 'cors', + credentials: 'omit' + }, + plugins: [ + new ExpirationPlugin({ + maxAgeSeconds: 30 * 24 * 60 * 60, + purgeOnQuotaError: true + }) + ] + }) +); + routing.registerRoute( /.*xgjalbum\.oss-cn-hangzhou\.aliyuncs\.com/, new CacheFirst({