diff --git a/static/sw.js b/static/sw.js index c6d4b9a..fb5be13 100644 --- a/static/sw.js +++ b/static/sw.js @@ -16,8 +16,12 @@ function install(event) { self.addEventListener("fetch", e => cacheFetch(e)) function cacheFetch(event) { + let fetchInit = {} + if (event.request.match(/(css|js|html)$/)) { + fetchInit.cache = "no-cache" + } event.respondWith( - fetch(event.request) + fetch(event.request, fetchInit) .catch(() => { return caches.match(event.request) })