Disable Cloudflare from cahing JS files


i use CF on one of my Domains.
although i don’t have any page rules, cloudflare caches javascript and images automatically.
sometimes for couple of hours and sometimes a day and then refresh its cache with the real existing Javascript code or image.

Example 1:
i replace a logo inside my CRM system in a server domain under CF.
The image is not replaced no matter what i do (i clear browser/system cache of course).
when i access the system, not from the CF domain, i see the new image presented.
only after a couple of hours, the image suddenly turns to the new one (didn’t touch anything).

Example 2:
i make change in a javascript file, placed in a a system that under CF and in another system with same version, not under CF. the javascript is changed only in the system not under CF.
after a couple of hours, suddently it changes also in the system under CF.

can i clear the Javascript cache manully?
can i clear it in a specific URL (not domain, but specific system under the domain )?

1 Like


First of all, Cloudflare also has caching on its side that is cleared (by default) every four hours.
If you want to remove said caching, you’d have to look into page rules.

If you want it to clear one time, you can go to your Dashboard, then “Caching”, then “Configuration” and “Purge Everything”.

If you’re actively developing, you can enable “Developer Mode” on the same page that will disable caching for 4 hours.

I strongly disrecommend disabling caching forever, as caching reduces server load.

Have a great day!

1 Like

wonderful. thanks for the quick response.

Does “purge Everything” can damage the functionality of my domain?
(i mean, beyond making performance slower for a bit…).

when i purge everything, can i delete certain configurations or important stuff…

Purge Everything is purging all the resources cached on the Cloudflare cache for this domain.
There is no damage to be expected.
These KB articles might help:

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