change strategy for caching
This commit is contained in:
parent
215cfc00a3
commit
9869e3697b
|
@ -21,10 +21,10 @@ workbox.routing.registerRoute(
|
|||
workbox.strategies.networkFirst()
|
||||
);
|
||||
|
||||
// use `cacheFirst` strategy for images
|
||||
// use `cacheFirst` strategy for images and static assets
|
||||
workbox.routing.registerRoute(
|
||||
/assets\/(img|icons|css)/,
|
||||
workbox.strategies.networkFirst()
|
||||
/assets\/(img|icons|fonts|webfonts)/,
|
||||
workbox.strategies.cacheFirst()
|
||||
);
|
||||
workbox.routing.registerRoute(
|
||||
/videos/,
|
||||
|
|
Loading…
Reference in a new issue