-
Notifications
You must be signed in to change notification settings - Fork 803
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
The networkFirst runtime strategy not storing the initial response #1415
Comments
You're not using You can learn more at https://developers.google.com/web/tools/workbox/modules/workbox-sw#skip_waiting_and_clients_claim |
Sadly, even with both skipWaiting() and clientsClaim() as the first two calls in the service worker, there is still no "runtime" cache container created at the first load. (Weirdly, there are two "precache" containers created, one being populated with app shell files, the other being empty.) Would you have any other ideas? (Sorry, my JS experience is limited, hence such a novice question.) Thank you. |
No worries! The runtime cache will only be created on first load if There's a discussion #368 about potential ways of helping folks who want their previously loaded subresources added to a runtime cache during the initial service worker installation. |
in my webpack.config.js new workboxPlugin.GenerateSW({
exclude: [/\.html$/],
runtimeCaching: [{
urlPattern: /index\.html/,
handler: "networkFirst"
}, {
urlPattern: "/",
handler: "networkFirst"
}]
}) @JanLenoch @jeffposnick |
Welcome! Please use this template for reporting bugs or requesting features. For questions about using Workbox, the best place to ask is Stack Overflow, tagged with
[workbox]
: https://stackoverflow.com/questions/ask?tags=workboxLibrary Affected:
workbox-sw
Browser & Platform:
Google Chrome v65.0.3325.181 for Windows
Issue or Feature Request Description:
When using the networkFirst runtime caching strategy, the response data does not get stored in the browser cache upon the initial load. To make Workbox store the response in cache, the user has to refresh (F5). Can be reproduced in https://github.com/Kentico/cloud-sample-pwa-app/tree/v2-caching . Is this by design, a bug, or some misunderstanding in my actual implementation?
Thanks!
The text was updated successfully, but these errors were encountered: