updated service worker.

This commit is contained in:
Michael Mainguy 2024-05-07 09:33:04 -05:00
parent 7ccca76119
commit 5a1c86a0dd

View File

@ -23,43 +23,43 @@ if (workbox.navigationPreload.isSupported()) {
}
workbox.routing.registerRoute(
new RegExp('/.*\\.png'),
new workbox.strategies.StaleWhileRevalidate({
new workbox.strategies.CacheFirst({
cacheName: CACHE
})
);
workbox.routing.registerRoute(
new RegExp('/.*\\.jpeg'),
new workbox.strategies.StaleWhileRevalidate({
new workbox.strategies.CacheFirst({
cacheName: CACHE
})
);
workbox.routing.registerRoute(
new RegExp('/.*\\.jpg'),
new workbox.strategies.StaleWhileRevalidate({
new workbox.strategies.CacheFirst({
cacheName: CACHE
})
);
workbox.routing.registerRoute(
new RegExp('/.*\\.glb'),
new workbox.strategies.StaleWhileRevalidate({
new workbox.strategies.CacheFirst({
cacheName: CACHE
})
);
workbox.routing.registerRoute(
new RegExp('/.*\\.css'),
new workbox.strategies.StaleWhileRevalidate({
new workbox.strategies.CacheFirst({
cacheName: CACHE
})
);
workbox.routing.registerRoute(
new RegExp('/.*\\.js'),
new workbox.strategies.StaleWhileRevalidate({
new workbox.strategies.CacheFirst({
cacheName: CACHE
})
);
workbox.routing.registerRoute(
new RegExp('/.*\\.wasm'),
new workbox.strategies.StaleWhileRevalidate({
new workbox.strategies.CacheFirst({
cacheName: CACHE
})
);