Skip to content

Commit c8d27c1

Browse files
committed
Change cache strategy
1 parent 0ec8100 commit c8d27c1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pwabuilder-sw.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.0.0/workbox-sw.js');
44

5-
const CACHE = "pwabuilder-precache-offline";
5+
const CACHE = "pwabuilder-offline-page";
66

77
// TODO: replace the following with the correct offline fallback page i.e.: const offlineFallbackPage = "offline.html";
88
const offlineFallbackPage = "offline.html";
@@ -26,7 +26,7 @@ if (workbox.navigationPreload.isSupported()) {
2626

2727
workbox.routing.registerRoute(
2828
new RegExp('/*'),
29-
new workbox.strategies.CacheFirst({
29+
new workbox.strategies.StaleWhileRevalidate({
3030
cacheName: CACHE
3131
})
3232
);

0 commit comments

Comments
 (0)