change strategy for caching

This commit is contained in:
Set Hallstrom 2020-08-12 16:53:17 +02:00
parent 215cfc00a3
commit 9869e3697b

View file

@ -21,10 +21,10 @@ workbox.routing.registerRoute(
workbox.strategies.networkFirst() workbox.strategies.networkFirst()
); );
// use `cacheFirst` strategy for images // use `cacheFirst` strategy for images and static assets
workbox.routing.registerRoute( workbox.routing.registerRoute(
/assets\/(img|icons|css)/, /assets\/(img|icons|fonts|webfonts)/,
workbox.strategies.networkFirst() workbox.strategies.cacheFirst()
); );
workbox.routing.registerRoute( workbox.routing.registerRoute(
/videos/, /videos/,