Cloudflare cache

Hello,
I have a website with static content but on every page of my website there is a php script in the footer which gets the currency rates from the bank. I would like cloudflare to cache everything but update the currency rate. Any suggestions on how to do it?

Please help

Sorry, but when it comes to caching a URL, it’s all or nothing.

Normally, Cloudflare does not cache HTML, but if you’ve set a Cache Everything page rule, my only suggestion would be to make a special rule for .html extensions to set Edge Cache to the minimum TTL of 2 hours (if it’s a free plan…paid plans can set this lower).

That’s bad.
Maybe I can put the footer with php script in the external php file and include it in the html?
This trick won’t work?

Also I have found the solution for java scripts

"If you want to disable only the particular JS or CSS simply put following attribute to the link or script tag.

<script data-cfasync="false" src="/javascript.js"></script>

Maybe there is something like that for php script?

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