1
0
Fork 0
mirror of https://github.com/marcrobledo/RomPatcher.js.git synced 2025-06-27 16:25:54 +00:00

PWA fix attempt 4b

This commit is contained in:
Marc Robledo 2019-04-18 12:06:00 +02:00
parent 1381ac34fb
commit a23fdbec00
2 changed files with 2 additions and 4 deletions

View file

@ -30,7 +30,7 @@ caches.keys().then(function(cacheNames){
});
var PRECACHE_ID='rom-patcher-js';
var PRECACHE_VERSION='v1';
var PRECACHE_VERSION='v2';
var PRECACHE_URLS=[
'/RomPatcher.js/','/RomPatcher.js/index.html',
'/RomPatcher.js/manifest.json',
@ -87,10 +87,8 @@ self.addEventListener('fetch', evt => {
evt.respondWith(
caches.match(evt.request).then(cachedResource => {
if (cachedResource) {
console.log('retrieving cached resource: '+cachedResource);
return cachedResource;
}else{
console.log('FAILED retrieving cached resource: '+evt.request);
return fetch(evt.request);
}
})