Skip to content

Instantly share code, notes, and snippets.

@petebrowne
Last active February 19, 2016 23:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petebrowne/b99d4e0c8ffe9c02f634 to your computer and use it in GitHub Desktop.
Save petebrowne/b99d4e0c8ffe9c02f634 to your computer and use it in GitHub Desktop.
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