Last active
February 19, 2016 23:35
-
-
Save petebrowne/b99d4e0c8ffe9c02f634 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
var CACHE_VERSION = 1; | |
var CACHE_NAME = `example-3_${CACHE_VERSION}`; | |
var CACHE_URLS = [ | |
'site.css', | |
'site.js' | |
]; | |
self.addEventListener('install', event => { | |
event.waitUntil( | |
caches.open(CACHE_NAME).then(cache => { | |
return cache.addAll(CACHE_URLS); | |
}) | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment