forked from Maxluli/TinderPokemon
Final commit (be carefull and change the service worker/manifest to adapt to your server)
This commit is contained in:
3
sw.js
3
sw.js
@@ -20,6 +20,8 @@ self.addEventListener("fetch", event => {
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
/*
|
||||
function cache(request, response) {
|
||||
if (response.type === "error" || response.type === "opaque") {
|
||||
return Promise.resolve(); // do not put in cache network errors
|
||||
@@ -29,6 +31,7 @@ function cache(request, response) {
|
||||
.open(CACHE_NAME)
|
||||
.then(cache => cache.put(request, response.clone()));
|
||||
}
|
||||
*/
|
||||
|
||||
const CACHE_NAME = "V2";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user