Update
This commit is contained in:
parent
dc6436d839
commit
9a004d1b02
17
public/sw.js
17
public/sw.js
|
@ -8,7 +8,7 @@ self.addEventListener('install', (e) => {
|
||||||
if (workbox) {
|
if (workbox) {
|
||||||
workbox.core.setCacheNameDetails({
|
workbox.core.setCacheNameDetails({
|
||||||
prefix: 'home-app',
|
prefix: 'home-app',
|
||||||
suffix: '0.0.2',
|
suffix: '0.0.3',
|
||||||
precache: 'precache',
|
precache: 'precache',
|
||||||
runtime: 'runtime',
|
runtime: 'runtime',
|
||||||
});
|
});
|
||||||
|
@ -31,7 +31,7 @@ if (workbox) {
|
||||||
maxAgeSeconds: 7 * 24 * 60 * 60,
|
maxAgeSeconds: 7 * 24 * 60 * 60,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
cacheName: 'startpage_me',
|
cacheName: 'assets',
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
workbox.routing.registerRoute(
|
workbox.routing.registerRoute(
|
||||||
|
@ -42,7 +42,18 @@ if (workbox) {
|
||||||
maxAgeSeconds: 60 * 60 * 24,
|
maxAgeSeconds: 60 * 60 * 24,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
cacheName: 'startpage_me',
|
cacheName: 'assets',
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
workbox.routing.registerRoute(
|
||||||
|
/\**/,
|
||||||
|
new workbox.strategies.StaleWhileRevalidate({
|
||||||
|
plugins: [
|
||||||
|
new workbox.expiration.Plugin({
|
||||||
|
maxAgeSeconds: 60 * 60 * 24,
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
cacheName: 'assets',
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue