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) {
|
||||
event.respondWith(
|
||||
fetch(event.request).catch(function() {
|
||||
return caches.match(event.request);
|
||||
caches.match(event.request).then(function(res){
|
||||
if(res){
|
||||
return res;
|
||||
}
|
||||
requestBackend(event);
|
||||
})
|
||||
);
|
||||
)
|
||||
});
|
||||
|
||||
function requestBackend(event){
|
||||
|
||||
Reference in New Issue
Block a user