Cloudflare bypassing cache for almost all static images

Hello -

My images were being cached beautifully up until a month ago and then suddenly they were not anymore. My server is sending a 1 month cache-control header but CF still keeps saying bypass or miss for every single static JPG or PNG image.

Can someone look into what’s going on?

Not without a URL of a page or image where caching is involved.

Sorry. Example:

Is your load balancer new? It’s setting a cookie, and Cloudflare won’t cache when cookies are involved because cookies imply personalized content.

1 Like

The setting on the LB is new - we added “sticky” targeting so the user always hits the same webhead. Any suggestions around this?

That’s the issue when you have a load balancer behind Cloudflare and you want to to enable sticky sessions.

Can load balancer selectively add session cookies to only HTML pages? If not, you need to create a Cache Everything page rule just to force caching the static content, or having a separate server without the load balancer just to serve static content.

1 Like

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