many small improvements

This commit is contained in:
2023-06-04 18:51:06 +02:00
parent 95c4319340
commit cf144e5b28
20 changed files with 583 additions and 74 deletions

View File

@ -1,5 +1,5 @@
const pwa_version = "03_numpy_grid_demo_202306031006"
const pwa_version = "03_numpy_grid_demo_202306041650"
const assets = ["./index.html",
"./main.py",
"./resources/bootstrap.css",
@ -48,4 +48,15 @@ self.addEventListener('fetch', event => {
return response;
})());
});
self.addEventListener('activate', (event) => {
event.waitUntil(
caches.keys().then((keyList) => {
return Promise.all(keyList.map((key) => {
if(key !== pwa_version) {
return caches.delete(key);
}
}));
})
);
});