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
(responding to an old msg, but whatevs) Are you using specific templates for previews? We bypass caching for both “cache eligibility” and “browser TTL” settings using a rule targeting the preview template (and make sure that EE doesn’t cache that template, as well).
I love how Octobrowser simplifies the complex world of browser fingerprints. By using Chromium code for spoofs, they ensure your device stays safeguarded. I’ve integrated https://octobrowser.net/ into my online ads workflow and haven’t looked back since. Being able to run tens of thousands of profiles on one device is exactly what I needed to scale my affiliate marketing business this year.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.