mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Reverting to previously nonworking service worker to check cache
This commit is contained in:
@@ -35,10 +35,13 @@ self.addEventListener('activate', function (event) {
|
|||||||
|
|
||||||
self.addEventListener('fetch', function (event) {
|
self.addEventListener('fetch', function (event) {
|
||||||
event.respondWith(
|
event.respondWith(
|
||||||
fetch(event.request).catch(function() {
|
caches.match(event.request).then(function(res){
|
||||||
return caches.match(event.request);
|
if(res){
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
requestBackend(event);
|
||||||
})
|
})
|
||||||
);
|
)
|
||||||
});
|
});
|
||||||
|
|
||||||
function requestBackend(event){
|
function requestBackend(event){
|
||||||
|
|||||||
Reference in New Issue
Block a user