|
|
@ -68,8 +68,8 @@ self.addEventListener('fetch', event => { |
|
|
|
.open(`offline${timestamp}`) |
|
|
|
.open(`offline${timestamp}`) |
|
|
|
.then(async cache => { |
|
|
|
.then(async cache => { |
|
|
|
try { |
|
|
|
try { |
|
|
|
const response = await fetch(event.request); |
|
|
|
const response = await fetch(event.request, {credentials: 'same-origin'}); |
|
|
|
cache.put(event.request, response.clone()); |
|
|
|
// cache.put(event.request, response.clone());
|
|
|
|
return response; |
|
|
|
return response; |
|
|
|
} catch(err) { |
|
|
|
} catch(err) { |
|
|
|
const response = await cache.match(event.request); |
|
|
|
const response = await cache.match(event.request); |
|
|
|