Open web-dave opened 5 years ago
const cachefiles = [
'runtime-es2015........js',
'runtime-es5........js',
'polyfills-es2015........js',
'polyfills-es5........js',
'main-es2015........js',
'main-es5........js',
'styles.....css',
'/',
'index.html'
]
caches
.open('angular-pwa')
.then(cache => cache.addAll(cachefiles ))
.then(() => self.skipWaiting())
self.addEventListener("fetch", e => {
// Static Content
e.respondWith(
caches.match(e.request)
.then(response => response || fetch(e.request))
);
});