Cloudflare Cache not update new versioned JS and css

I just update my website with new JS and CSS but looks like Cloudflare is not taking this new versioned file. it still shows the old versioned file. I changed the file version with the URL but Cloudflare not taking a new one.

Like my old version URL is www.abc.com/test.js?v=123
The new version URL is www.abc.com/test.js?v=456

Cloudflare showing new URL with old contents. So every time I have to purge my cache from Cloudflare.

Is there no way it will update contents as per server?

If you’re using query strings, and your HTML isn’t cached (Cloudflare doesn’t cache HTML by default), then the site shouldn’t be using old CSS and JS. If you posted an actual URL to test, we can check.

will know you

https://www.reservations.com/js/pages/hotel/checkout.js?v=ezMO5AlW6PBfVUwvNZsFsdwvGZdSnLd32699f_yZZVM

https://www.reservations.com/js/pages/hotel/checkout.js

The ezMO5AlW6PBfVUwvNZsFsdwvGZdSnLd32699f_yZZVM shows a HIT. Are you saying you change that long version string and it’s still showing a HIT and/or the old content?

When I try a new query string, I get a miss and the code isn’t minified, but the ‘trim’ statement is there. Try again and I get a HIT with a minified response that includes the ‘trim’.

In other words, I can not replicate the issue.

I mean I update server with new version of JS and it contian new version in urlstring. but cloudflare update url but not update it’s contents

Issue #1, your server certificate appears to have expired three years ago.

I had the same issue while using Cloudflare pages. JavaScript didn’t update automatically after a change and it stayed cached for 1 day. For me, this only happened when accessing the page using a custom domain. When visiting the site with the pages.dev url everything worked as intended.
This happened a couple of days ago, tried replicating it earlier today and the issue only persisted for ~5 minutes.

no, we have non expired certificate too

image

expired one is godaddy which not used when we moved to cloudflare

What’s your current encryption mode on Cloudflare? And does your server IP address end in 69?

yes our ip end with 69

and how to determine encrptionmode. ? as my old manager setup this all thing.

any update sandro?

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.