-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[1.0] Client caching issues #1193
Comments
Yes :-) I've been noodling over this the past week or so and I have a number of tweaks I'm going to be making to core & the offline plugin (as it's not just with SW this problem shows up though it's much more likely to show up with a SW). Will report back early next week with a PR. |
Did some work on this #1217 If a user w/ sw navigates to a page it doesn't know it immediately reloads. Also when a new service worker is installed the page is reloaded. Makes for a bit of a "hiccup" but it's not too bad (loading from the sw is fast). We'll roll with this for a while and see how we like it. |
Thanks Kyle, I'll check the result on my site today. |
Okayyy. Feedback from my side: I had to manually refresh the page. So when landing on homepage then navigating to another page (with new content from last build) the site gave an error in the console. When I refresh manually, everything is fine. |
Yeah, this stuff is slow to test because you have to build to get the new sw then do another build to test the upgrade :-( took a while to build because of that. I've been testing it via gatsbyjs.org upgrades and it seems pretty solid. |
Thanks for testing! Please report back any problems or suggestions for improvements. |
Hey. Just a small update confirming what I said above.
Obviously 2. is not a "real issue". It's on me if I don't use Gatsby's API. |
Here is the console error when visiting Gatsby website today: |
@MarcCoet did the page refresh once the new service worker comes in? |
The site is supposed to load from the service worker and have all the site resources cached there and then once a new SW comes in, it should reload immediately. The only way I can happening what you saw is if the SW hadn't cached a file e.g. like there, the home page component, which is possible as right now since it's not precaching all page components. |
Hey @KyleAMathews. Did I answer you somewhere else? I just found back this issue and noticed you were still hanging there. Crazy time for me, sorry. |
I am also having this issue – load a new url with old sw in place, sent to 404, have to reload, re-navigate to original url |
Hey, congrats for the beta release! Things are moving fast. That's awesome.
Since I started using the offline and manifest plugins my site shows old data and sometimes errors... I messed a lot with it so I can't really trace back to a step by step reproducible problem but what I know is whatever the problem is, it gets resolved when I unregister service workers. Shouldn't this be done every time the user is online to make sure they get the latest data?
The text was updated successfully, but these errors were encountered: