Refonte total
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
const CACHE = 'safeaccess-v1';
|
||||
const ASSETS = ['/', '/index.html', '/manifest.json'];
|
||||
|
||||
self.addEventListener('install', e => {
|
||||
e.waitUntil(caches.open(CACHE).then(c => c.addAll(ASSETS)));
|
||||
});
|
||||
|
||||
self.addEventListener('fetch', e => {
|
||||
e.respondWith(
|
||||
caches.match(e.request).then(r => r || fetch(e.request)).catch(() => caches.match('/index.html'))
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user