Uppdatera 'sw.js'
Add if in sw.js line 48
This commit is contained in:
parent
bd4ff27351
commit
7d019f735d
1
sw.js
1
sw.js
@ -45,6 +45,7 @@
|
|||||||
|
|
||||||
/** cache-filer först, upddaterar cache från servern */
|
/** cache-filer först, upddaterar cache från servern */
|
||||||
self.addEventListener('fetch', function (event) {
|
self.addEventListener('fetch', function (event) {
|
||||||
|
if (!(event.request.url.indexOf('http') === 0)) return;
|
||||||
event.respondWith(
|
event.respondWith(
|
||||||
caches.open(cacheKey).then(function (cache) {
|
caches.open(cacheKey).then(function (cache) {
|
||||||
return cache.match(event.request).then(function (response) {
|
return cache.match(event.request).then(function (response) {
|
||||||
|
Loading…
Reference in New Issue
Block a user