Skip to content

Instantly share code, notes, and snippets.

@amahdy
Created March 1, 2017 20:00
Show Gist options
  • Save amahdy/59c36389195be8b897c9bef7fb3a3bee to your computer and use it in GitHub Desktop.
Save amahdy/59c36389195be8b897c9bef7fb3a3bee to your computer and use it in GitHub Desktop.
self.oninstall = function(event) {
event.waitUntil(
self.skipWaiting().then(
caches.open(CACHE_NAME + '-v' + CACHE_VERSION).then(function(cache) {
return cache.addAll(filesToCache);
})
)
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment