2

I've had an issue with my browsers not showing an updated version of a file. Occasionally I will make a change, upload the file via FTP, and the file will immediately show. Other times, I'll clear the cache and hard refresh, and the updated file will take half an hour to show. Here is some info:

  • Tried on both Chrome and Firefox (incognito and private too).
  • When I try it on my phone, it shows up fine, and immediately the other browsers start showing correctly too.
  • Sometimes, even after the browsers start showing correctly, I'll refresh and it will go back to a previous version.
  • Originally had mod_expires on in my .htaccess, commented it out. No changes.
  • Website using Sucuri.net and MaxCDN. Sucuri caching is disabled.
  • Sucuri GZIP compression is enabled. I don't think this should affect anything.
  • MaxCDN is having trouble immediately purging their cached files and replacing them with the new files when I upload and purge. I assumed my issue is making this happen because I don't believe the MaxCDN implementation could affect my issue. (MaxCDN doesn't run all requests through their servers like Cloudflare.)
  • Sometimes MaxCDN will update immediately when I purge the file. As far as I know no consistent correlation with any action I take.

Is there something I have overlooked that could be making this issue happen?

Peter O.
  • 28,965
  • 14
  • 72
  • 87
mcheah
  • 543
  • 4
  • 22
  • It probably isn't a solution to your problem but have tried something like [this](https://stackoverflow.com/questions/126772/how-to-force-a-web-browser-not-to-cache-images?rq=1)? You can do it for css and js files too (i.e. `href="/path/to/js/file/script.js?randomnumberhere"`) – Cave Johnson Apr 18 '16 at 23:56
  • This is a great solution and I had actually forgotten to do this, but my issue is primarily that my CDN doesn't update their version of the files, which I assumed was due to something that was happening on my server. – mcheah Apr 19 '16 at 15:26

0 Answers0