summaryrefslogtreecommitdiff
path: root/web/static/sw.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/static/sw.js')
-rw-r--r--web/static/sw.js19
1 files changed, 6 insertions, 13 deletions
diff --git a/web/static/sw.js b/web/static/sw.js
index 3a92eb3..7ed7a85 100644
--- a/web/static/sw.js
+++ b/web/static/sw.js
@@ -1,23 +1,15 @@
const CACHE_PREFIX = 'dartboat-'
-const CACHE_VERSION = '1';
+const CACHE_VERSION = '2';
const CACHE_NAME = `${CACHE_PREFIX}${CACHE_VERSION}`;
const FILES = [
'./',
+ 'style.css',
'dartboat.js',
'dartboat_wasm.js',
'dartboat_wasm.wasm',
- 'style.css',
- 'icons.woff2',
- 'inter-num.woff2',
- 'dartboat_16.png',
- 'dartboat_32.png',
- 'dartboat_64.png',
- 'dartboat_96.png',
- 'dartboat_128.png',
- 'dartboat_192.png',
- 'dartboat_256.png',
- 'dartboat_512.png'
+ 'fonts/bootstrap-icons-sub.woff2',
+ 'fonts/inter-num.woff2'
]
function swlog(str) {
@@ -57,7 +49,8 @@ self.addEventListener('fetch', e => {
if (cached)
return cached;
- if (!(resp = await fetch(e.request)).ok) {
+ const resp = await fetch(e.request);
+ if (!resp.ok) {
swlog(`ignore status:${resp.status} ${e.request.url}`);
} else {
swlog(`put ${e.request.url}`);