Open WPACenter opened 6 years ago
Assuming you are using pretty permalinks, something like this should work:
route: /^[^.]+$/
v2.0.1
has been published. We use Workbox V3 now, which means you don't need to write these regexp in _config.yml
. You can write them directly in your service-worker.js
:
workbox.routing.registerRoute(
/.*\.(?:png|jpg|jpeg|svg|gif|html)/,
workbox.strategies. cacheFirst()
);
See v2 -> v3 migration guide for more informations.
I'd like the html of pages that are visited to be added to the runtime cache; however, I am unsure about how to do this. The example below does a good job of caching all images, but does not catch the html pages.
` runtime_cache: