Update 2025-04-13_16:43:49
This commit is contained in:
24
static/service-worker.js
Normal file
24
static/service-worker.js
Normal file
@ -0,0 +1,24 @@
|
||||
self.addEventListener('install', (e) => {
|
||||
e.waitUntil(
|
||||
caches.open('victorytimer-v1').then((cache) => {
|
||||
return cache.addAll([
|
||||
'/',
|
||||
'/index.html',
|
||||
'/style.css',
|
||||
'/app.js',
|
||||
'/timer.js',
|
||||
'/button.js',
|
||||
'/chart.js',
|
||||
'/messages.js',
|
||||
'/manifest.webmanifest'
|
||||
]);
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
self.addEventListener('fetch', (e) => {
|
||||
e.respondWith(
|
||||
caches.match(e.request).then((resp) => resp || fetch(e.request))
|
||||
);
|
||||
});
|
||||
|
Reference in New Issue
Block a user