change strategy for caching
This commit is contained in:
parent
215cfc00a3
commit
9869e3697b
|
@ -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/,
|
||||||
|
|
Loading…
Reference in a new issue