Created
October 28, 2019 14:15
-
-
Save thepassle/243c87be701b1395f33f68eb2d427db0 to your computer and use it in GitHub Desktop.
strategies7
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
// cache first | |
self.addEventListener(‘fetch’, function(event) { | |
event.respondWith( | |
caches.match(event.request).then(function(response) { | |
return response || fetch(event.request); | |
}) | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment