Created
March 22, 2017 07:41
-
-
Save jelmerdemaat/74a46b3389afd532d34bf44652f7a1b0 to your computer and use it in GitHub Desktop.
Service worker example
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('install', function(event) { | |
event.waitUntil( | |
caches.open('sw-v1').then(function(cache) { | |
return cache.addAll([ | |
'./', | |
'style.css', | |
'main.js' | |
]); | |
}) | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment