Cache Everything configuration

Hello,

In one of our landings We use a different image for mobile and desktop. The problem comes when Page Rule with Cache everything configuration is activated they only cache mobile or desktop image not both.

How can We handle it? Not caching this images?

Thanks!
Gerard

I bet your mobile and desktop image have a different URL, so it’s the page cache itself that’s causing the problem. The only way to fix that is to disable Cache Everything for that landing page.

:wave: @gerard,

You have several options.

  1. Send a header from the origin telling Cloudflare not to cache the image.
  2. Create a page rule specific to this exact image path which has a setting for cache level of bypass.
  3. If you are an Enterprise customer ask for inclusion of a custom cache key (scoped to an appropriate rule) from your account team.
  4. Write a worker to cache different versions of the image based on device/type or other criteria.

-oG

1 Like

Thanks for your suggestions!! I will try that!