Slide 45
Slide 45 text
var CACHE_NAME = 'todo-dino-v1';
Var CACHE_URLS = ['/', '/app.js', '/app.css'];
self.addEventListener('install', function(event) {
// Install app shell
event.waitUntil(
caches.open(CACHE_NAME)
.then(function(cache) {
return cache.addAll(CACHE_URLS);
})
);
});
S E R V I C E W O R K E R
/ s w. j s