diff --git a/front/src/serviceWorker.ts b/front/src/serviceWorker.ts index 9fe63365b..9534c50eb 100644 --- a/front/src/serviceWorker.ts +++ b/front/src/serviceWorker.ts @@ -1,7 +1,7 @@ /// import { cleanupOutdatedCaches, precacheAndRoute } from 'workbox-precaching' -import { NetworkFirst, StaleWhileRevalidate } from 'workbox-strategies' +import { NetworkFirst } from 'workbox-strategies' import { ExpirationPlugin } from 'workbox-expiration' import { registerRoute } from 'workbox-routing' import { clientsClaim } from 'workbox-core' @@ -39,13 +39,6 @@ registerRoute(({ url }) => { ] })) -// NOTE: Stale-While-Revalidate cache for album covers -// We're serving from cache if available and making a request -// in the background to update the cache for next request -registerRoute(({ url }) => { - return url.pathname.startsWith('/media') -}, new StaleWhileRevalidate()) - // Precache all assets and add routes for them // https://developer.chrome.com/docs/workbox/reference/workbox-precaching/#method-precacheAndRoute precacheAndRoute(self.__WB_MANIFEST)