PawMatchAI / service-worker.js
DawnC's picture
update app.py, styles.py, dmanifest, service worker and icon for mobile prepare
ef9be46
raw
history blame
528 Bytes
const CACHE_NAME = 'pawmatch-v1';
const urlsToCache = [
'/',
'/index.html',
'/assets/icon-192.png',
'/assets/icon-512.png'
];
self.addEventListener('install', (event) => {
event.waitUntil(
caches.open(CACHE_NAME).then((cache) => {
return cache.addAll(urlsToCache);
})
);
});
self.addEventListener('fetch', (event) => {
event.respondWith(
caches.match(event.request).then((response) => {
return response || fetch(event.request);
})
);
});