Created
October 2, 2017 07:21
-
-
Save osvaldasvalutis/f78b3dcfaf086d6acae96d276f57fab9 to your computer and use it in GitHub Desktop.
Service Worker gotchas – https://medium.com/kollegorna/service-worker-gotchas-af20a9dab986
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const otherResources = [ | |
'/about/', | |
'/contact/', | |
'/services/' | |
], | |
cacheCriticals = () => { | |
return caches.open(version).then( cache => { | |
cache.addAll(otherResources); // important, but not critical resources | |
return cache.addAll(criticalResources); // critical resources | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment