a month ago
Hi everyone,
I'm new here.
I have a React + Vite project running behind Cloudflare for CDN and caching.
However, every time I publish a new release, it turns into a nightmare — the browser keeps requesting old static files.
I tried updating the index.html
file on my React project with meta tags to prevent caching:
<meta http-equiv="expires" content="0" />
<meta http-equiv="Cache-control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
It helped a little, but the browser cache still causes issues sometimes.
Is there any tutorial or best practice guide on how to properly configure Railway + Cloudflare caching and deployments for React apps?
Thanks in advance!
1 Replies
a month ago
Hey tude-diniz,
We don't explicitly have a guide for exactly what you're looking for right now in terms of caching. Here's some of the guides around React and Cloudflare that we do have:
React: https://docs.railway.com/guides/react
Best Practices: https://docs.railway.com/overview/best-practices
For Cloudflare, you're probably getting into Cache Rules: https://developers.cloudflare.com/cache/how-to/cache-rules/ and Tiered Cache https://developers.cloudflare.com/cache/how-to/tiered-cache/
Status changed to Awaiting User Response railway[bot] • 28 days ago