Cache expired image

Hello!

I ran into an issue I can not solve.
When loading a specific page an image is not showing up and responds with a 404.
Other image on the page respond normally with a 200

All of them are on the server under the correct path.

Following things I did check (on firefox and safari):

  1. cf-cache-status of the 404 error image is EXPIRED
  2. cf-cache-status of all other images are HIT
  3. when trying to load the same image on another browser (safari) all images loads up correctly
  4. when trying to load the image on firefox as a non cached version, it shows up correctly
  5. The file permissions on the server are all the same and correct
  6. the affected image is a jpg all others are jpg but are cached as image/webp

I did get other 404s on .css lately, but I thought it was a different issue…

What can I do? How to find the error and fix?

A 404 error should show up in your server logs. If you need any more assistance, please post the URL of an affected page.

Nothing in the error logs!

https://rebrand.ly/i1gfap3

That’s interesting. In Safari, the image shows up as DYNAMIC (not cached by Cloudflare).

The pottery wheel image you linked to is a PNG. It looks like the cache header sent with it does not specify Public caching, which is probably why Cloudflare tags it as DYNAMIC.

I think even more interesting is that in firefox the image shows up as expired but all other content under the same path with similar creation dates show up normally.

I will purge the cache now and see what will happen in the next days.

UPDATE: In my cloudflare analytics Workers (per zone) dashboard I can find all of the 404s

If you add ?nocache=true to the url I added a page url which sets the cache level to bypass and then the image shows up normally…

The link you posted returns a 404, not an image. Therefore, it is cached for 3 min by default. But in your case it’s been cached for 14400 seconds, which seems to indicate you have a “cache everything” page rule in place. Someone requested this image when it was not available, the origin for some reason returned a 404, and that’s what was cached. Just purge the cache for that specific URL and the image should show normally.

1 Like

Thanks for looking into it.

I have 3 page rules in place, non of them has a “cache everything” rule in place.

I purged the url - didn’t work. I purged the whole site, didn’t work.

It looks like your origin is somehow telling CF to cache 404s. I can see the image by appending any query string to it, which means the image file itself is available at the origin, but somehow that 404 response got cached. You want to open a ticket with support for clarification.

I did!

I will update on this after the support responds.

The diagnostic tool gives me following errors:

  • non_cloudflare_nameservers: Non-Cloudflare nameservers found
  • no_dnssec_found: The site does not have any DNSSEC records
  • not_found_ds_record: The hostname has no DS records

Any idea?
Support of origin is not very helpful.

If your site is not pointing the DNS to Cloudflare nameservers, what you have is a partner setup, whereby the hosting company offers Cloudflare services. You need to talk to their (hosting provider’s) support.

1 Like

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