Created
August 6, 2017 19:30
-
-
Save petmat/daf958313efe670ddec3e2a1c91918fc to your computer and use it in GitHub Desktop.
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
self.addEventListener('fetch', function(e) { | |
console.log('[ServiceWorker] Fetch', e.request.url); | |
e.respondWith( | |
caches.match(e.request).then(function(response) { | |
return response || fetch(e.request); | |
}) | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment