1
0

Cleanup font caching and requesting

This commit is contained in:
kolaente
2021-01-30 18:33:21 +01:00
parent e0be77d88f
commit 826d90c7eb
18 changed files with 11 additions and 3214 deletions

View File

@ -4,7 +4,7 @@
// Cache assets
workbox.routing.registerRoute(
// This regexp matches all files in precache-manifest
new RegExp('.+\\.(css|json|js|eot|svg|ttf|woff|woff2|png|html|txt)$'),
new RegExp('.+\\.(css|json|js|svg|woff2|png|html|txt)$'),
new workbox.strategies.StaleWhileRevalidate(),
)
@ -74,7 +74,7 @@ self.addEventListener('notificationclick', function (event) {
switch (event.action) {
case 'mark-as-done':
// FIXME: Ugly as hell, but no other way of doing this, since we can't use modules
// in service workersfor now.
// in service workers for now.
fetch('/config.json')
.then(r => r.json())
.then(config => {