|
|
|
|
|
by kentonv
1632 days ago
|
|
Hey Ben, we think your re-deploy solved the problem, but the old content is still being served from Cloudflare's cache for many people. Can you do a cache purge in the Cloudflare dashboard? (It just updated for me, looks much better. But the old version might still be cached in some locations.) The root cause was actually something we fixed last month, but it seems problems can stick around if the site was originally deployed before that fix... we're working on that. |
|
The problem is that your site generator produces different file names for each version, but doesn't preserve the old files. So when you upload a new version, then the old version of the assets become 404, unless they happened to be cached. But it's possible the HTML is cached and the CSS not cached, in which case people will get the old HTML which refers to a CSS file that is now 404.
This is a classic problem and we need to find a better way to solve it. In principle, though, you could manually avoid it by preserving older versions of the CSS such that they continue to be served under new versions of the site.
Alternatively, if you change the config on your domain so that it doesn't cache at all (or at least turn off the "cache everything" option), and instead rely on Cloudflare Pages itself to manage caching, that also should mostly* avoid the problem. Pages does do its own caching, so adding a second layer of caching on top of that shouldn't be necessary.
* There's still a problem if someone is unlucky enough to load the site exactly when it's being updated, but at least a refresh fixes that. We need a better answer, though...