From 970395a4d7d4dd62b858dcbe2987de66a986a310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Sat, 13 Aug 2016 16:10:46 +0200 Subject: [PATCH] Updated service-worker some --- static/offline/offline.html => offline.html | 0 service-worker.js | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) rename static/offline/offline.html => offline.html (100%) diff --git a/static/offline/offline.html b/offline.html similarity index 100% rename from static/offline/offline.html rename to offline.html diff --git a/service-worker.js b/service-worker.js index dd41d378..4af99dd0 100755 --- a/service-worker.js +++ b/service-worker.js @@ -1,4 +1,4 @@ -var version = 'v2.1'; +var version = 'v2.2'; var CACHE_FILES = [ 'https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=https://zoff.no/&choe=UTF-8&chld=L%7C1', 'https://fonts.googleapis.com/icon?family=Material+Icons', @@ -16,7 +16,7 @@ var CACHE_FILES = [ '/static/images/GitHub_Logo.png', '/static/images/facebook.png', '/static/images/twitter.png', - '/static/offline/offline.html', + 'offline.html', '/static/font/roboto/Roboto-Light.woff2', '/static/font/roboto/Roboto-Regular.woff2', '/static/font/roboto/Roboto-Thin.woff2', @@ -69,7 +69,7 @@ self.addEventListener("activate", function(event) { caches /* This method returns a promise which will resolve to an array of available cache keys. - + .keys() .then(function (keys) { // We return a promise that settles when all outdated caches are deleted. @@ -82,7 +82,7 @@ self.addEventListener("activate", function(event) { .map(function (key) { /* Return a promise that's fulfilled when each outdated cache is deleted. - + return caches.delete(key); }) );