I’m not sure if this is a Netlify issue, Gatsby issue, or both.
Since switching my site over to a Gatsby build, whenever I go to my public domain, an old cached version of my site loads first. I have to hard reload to see my updated site.
(MacOS Catalina, Chrome Version 80.0.3987.132)
I have tried clearing all caches and builds but cannot nail down what this issue is. Any assistance would be greatly appreciated!
I am not seeing the issue in an incognito window. () But clearing the caches don’t seem to work (iirc).
The bigger problem is that it is happening to other people who visit my site, and they just think it hasn’t been updated in x-amount of time. They don’t feel the need to hard refresh.
hmm. if you are seeing the correct version in an incognito window, and others are also seeing the right one, then that basically rules out anything but a local browser issue which we can’t really help you with.
Some ideas: have you tried a different browser?
what happens when you try and view the site on a different device, say, your phone?
Seems like maybe I weird question, but humour me: Are the other people who are seeing the old site using the same internet service provider? We had a weeeeird bug a while back where everyone who was using a specific local ISP was having problems. And I assuming these other folks are also clearing their cache?
@tomrutgers has a good point also. Not sure about that. I’m going to wait for a Support Engineer to weigh in.
I just removed all instances of netlify from marguerite.io’s nameservers and deployed the code to marguerite.wtf.
Even with everything removed from marguerite.io, I still see the old, pre-gatsby, version of the site on marguerite.io. So this must be a caching issue with my domain registrar? I use iwantmyname.com. Or a chrome issue
so, the content still exists on the cdn nodes - you deploy to origin, and then it gets pushed out to the edge. so that’s actually not surprising. It won’t get deleted unless you delete the netlify site.
Is the .wtf site the correct site, now? This is what i see:
if yes:
I would suggest you delete the netlify site that feeds into marguerite.io through our dashboard, and create a new site, deploy the same code that is on wtf (if that, indeed, is the correct one) and then re-associate the .io domain name with the new netlify site containing the right content.
or, even, just change the site that current site that feeds into the .wtf site to have the .io domain name, if it is indeed the correct one.
Hi @javierpiedra, welcome to the community! That’s interesting for when you update your Gatsby site but the issue mentioned here was about pre-Gatsby versions of their site so I’m not sure that line of code would help in that case.
Great advice though! Maybe you can write a separate post that shows using that to make sure a Gatsby-based site is always updated even with a serviceworker. Thanks!