Static Content Question

Hello Everyone, I’m new to Cloudfare, and CDNs in General.

I am trying to under stand the process of updating some Static Content like .js or .css files.

I understand that if I make the changes to these files they will not be reflected right away unless I enable Developer mode. After updating and testing these files , If I do not turn off Developer mode it will auto disable after 3 hours.

How then do I know when the those static files will be updated in the cache? Is there a setting I can enable or check?

thanks.
Scott

There’s nothing you can check that will predict cache expiration. If you make changes, you’ll need to Purge Cache, either Everything, or specific URLs.

Dev Mode will bypass that cache, but after 3 hours, the cache comes back as it was with nothing purged.

@sdayman thanks for the reply.

Not sure I follow. Once Dev mode is turned off the updated files must at some point get updated to the cache as they have changed.

I can 't believe that every time some one makes changes they have to either purge the entire cache or go line by line to the files being changed!?

I opened support ticket to verify the process.

Dev Mode bypasses the cache. Yes, at some point, the cache is updated, but Dev Mode doesn’t affect that. Dev Mode lets you see the changes live. If all those changes look good, Purge the cache for those changes to take effect.

Those are static files, and by definition, rarely, if ever, change. The Cloudflare Cache defaults to a couple of hours unless you say otherwise.

https://support.cloudflare.com/hc/en-us/articles/202775670-How-Do-I-Tell-Cloudflare-What-to-Cache-

1 Like

Thanks @sdayman , I understand it all now, Just trying to see if I can relay this to the Dev Team. :neutral_face:

One last question is there any harm in Purging the Entire cache over the path to the static files?

No real harm. It’s generally what I do. It just slows down some files for the first visitor at that edge node as Cloudflare refreshes the cache in that region.

This topic was automatically closed after 31 days. New replies are no longer allowed.