Slide 48
Slide 48 text
2. Installing
self.addEventListener('install', function(event) {
event.waitUntil(
caches.open(my_cache_version).then(function(cache) {
return cache.addAll([
'/css/images/leaves-right.jpg',
'/css/images/icons-social.png',
'/css/site.css',
'/js/site.js',
'/',
'/offline/'
]);
}).then( () => self.skipWaiting() )
);
});
https://erikrunyon.com/sw.js