-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add html pages to runtime cache #10
Comments
Assuming you are using pretty permalinks, something like this should work:
|
workbox.routing.registerRoute(
/.*\.(?:png|jpg|jpeg|svg|gif|html)/,
workbox.strategies. cacheFirst()
); See v2 -> v3 migration guide for more informations. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: - route: /.*\.(?:png|jpg|jpeg|svg|gif|html)/ strategy: cacheFirst
The text was updated successfully, but these errors were encountered: