As per this post:
I’m interested in using Cloudflare to improve page load times, and want to be able to cache html responses in Cloudflare for a long time (e.g. a year) but not allow browsers to cache the page. That way if I change a page I can purge the Cloudflare cache and it’s instantly available to users. Essentially I want to use Cloudflare as an on-the-fly static publishing system.
I was able to achieve this with a header like
Cache-Control: s-maxage=86400, max-age=0 but I’ve been reading the spec a bit, and now I’m concerned that the s-maxage property will be picked up by unintended recipients such as ISPs or company proxy caches. If those proxies respect the s-maxage property, then they could continue to hold on to and serve an outdated html response, even after I purge the Cloudflare cache.
I really want to make sure that only Cloudflare will cache my html responses, and no one else (so that I have the ability to instantly purge the cache). Does anyone know how to do this?