aboutsummaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-07-18 17:42:40 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-07-18 17:42:40 -0400
commit02a6f590a13228da1485cf91e42ebd5684b3a6dd (patch)
tree128c16208c1ba270b7427c968f524b50996f7be5 /static
parente1e7829e00df7dfae085cd5ab3454f271629545e (diff)
downloadpersonal-website-02a6f590a13228da1485cf91e42ebd5684b3a6dd.tar.gz
personal-website-02a6f590a13228da1485cf91e42ebd5684b3a6dd.tar.bz2
personal-website-02a6f590a13228da1485cf91e42ebd5684b3a6dd.zip
Actually removing blog temporary
Diffstat (limited to 'static')
-rw-r--r--static/sw.js33
1 files changed, 32 insertions, 1 deletions
diff --git a/static/sw.js b/static/sw.js
index ea69899..3f26afe 100644
--- a/static/sw.js
+++ b/static/sw.js
@@ -1 +1,32 @@
-// THIS FILE SHOULD NOT BE VERSION CONTROLLED
+importScripts('https://cdn.jsdelivr.net/npm/workbox-cdn@4.3.1/workbox/workbox-sw.js')
+
+// --------------------------------------------------
+// Configure
+// --------------------------------------------------
+
+// Set workbox config
+workbox.setConfig({
+ "debug": false
+})
+
+// Start controlling any existing clients as soon as it activates
+workbox.core.clientsClaim()
+
+// Skip over the SW waiting lifecycle stage
+workbox.core.skipWaiting()
+
+workbox.precaching.cleanupOutdatedCaches()
+
+// --------------------------------------------------
+// Precaches
+// --------------------------------------------------
+
+// Precache assets
+
+// --------------------------------------------------
+// Runtime Caching
+// --------------------------------------------------
+
+// Register route handlers for runtimeCaching
+workbox.routing.registerRoute(new RegExp('/_nuxt/'), new workbox.strategies.CacheFirst ({}), 'GET')
+workbox.routing.registerRoute(new RegExp('/'), new workbox.strategies.NetworkFirst ({}), 'GET')