Speaking of Cloudflare…can anyone share their Cloudflare Cache Rule for bypassing caching for preview pages?
In my template, if an entry is in “Draft” status, I’m using this tag: {exp:http_header cache_control="no-store"}.
I can verify that I see this in the response header on my dev site but on production, Cloudflare ignores the cache-control header. It must be something in my Cache Rules?
ExpressionEngine’s default headers always ask for no caching, so setting a header specifically for a preview should not be necessary. This is true regardless of what cache settings (in EE) you’re using, even serving CSS or js templates.
So yes it’s likely cloudflare settings or something else somewhere between EE and the browser.
https://docs.expressionengine.com/v6/development/legacy/libraries/output.html#set_headerheader-replace–true is vaguely useful but this isn’t really spelled out in the docs anywhere
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.