|
|
|
|
@ -8,7 +8,7 @@ self.addEventListener("install", event => {
|
|
|
|
|
'/static/app/css/custom.css',
|
|
|
|
|
'/static/app/js/dbcontrol.js',
|
|
|
|
|
'/static/app/js/home.js',
|
|
|
|
|
'/static/app/js/timer.js',
|
|
|
|
|
'/static/app/js/timer.js',
|
|
|
|
|
'/static/app/js/welcomeControl.js',
|
|
|
|
|
'/static/app/js/exportDB.js',
|
|
|
|
|
'/static/app/js/importDB.js',
|
|
|
|
|
@ -56,15 +56,15 @@ self.addEventListener('activate', event => {
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Serve from Cache
|
|
|
|
|
self.addEventListener("fetch", event => {
|
|
|
|
|
event.respondWith(
|
|
|
|
|
caches.match(event.request)
|
|
|
|
|
.then(response => {
|
|
|
|
|
return response || fetch(event.request);
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
return caches.match('/app/home');
|
|
|
|
|
})
|
|
|
|
|
)
|
|
|
|
|
});
|
|
|
|
|
// // Serve from Cache
|
|
|
|
|
// self.addEventListener("fetch", event => {
|
|
|
|
|
// event.respondWith(
|
|
|
|
|
// caches.match(event.request)
|
|
|
|
|
// .then(response => {
|
|
|
|
|
// return response || fetch(event.request);
|
|
|
|
|
// })
|
|
|
|
|
// .catch(() => {
|
|
|
|
|
// return caches.match('/app/home');
|
|
|
|
|
// })
|
|
|
|
|
// )
|
|
|
|
|
// });
|