I requested some images be removed on a website that uses Cloudlfare. They were removed, but when mobile users click on them they still appear on a CDN url. Some were CDN1, others CDN2, 3, 4 etc. I a managed to have them all taken down except CDN4, and the host won’t take these down for some reason.
My question is will these expire? And if so, what is the maximum ttl for the CDN images?
While items are evicted from the Cloudflare cache as necessary, you would be better off to purge your Cloudflare cache after you have modified your origin site if you want the changes to be reflected immediately.
Thanks for the response. It’s not my website, so I don’t have that option. I’m just wondering if the images will remain there for ever, or if they’ll eventually go. As I understand, each CDN image has a TTL. But is it possible a CDN image can remain online for ever (even if the source image has been removed)? The source images were taken down about 6 months ago.
Since it is not your server, how do you know the file was actually removed? Cloudflare doesn’t normally keep an unavailable item in the cache that long.
There isn’t much assistance the Community can offer you for a site that you don’t control. You will need to ask the site operator for support.
I suppose I don’t know for sure. The main image links were removed, the images have vanished from the website, and the only exception is when someone clicks the blank image on mobile, the CDN4 image appears. To me that suggests the cache just hasn’t been updated. The site owner is unresponsive, despite having deleted the other images.
You could always take a look at the relevant headers returned when requesting the file to see what they indicate. Many here would use curl for that. You can use the developer tools in your web browser.
You may find the cf-cache-status header of interest. It will return a value of HIT or MISS. Note that it is very likely to see the former on a subsequent request that initially returned the latter since the initial request could cause the file to be cached by Cloudflare, if eligible. The cache-control and expires headers may also interest you.
Cloudflare doesn’t use special CDN names by default. It is a caching reverse proxy. A site operator could certainly structure their content in a manner where they only used particular domains with Cloudflare, but you would need to make that determination yourself by analyzing the page structure.
DNS returns Cloudflare IPs on that hostname, so you know that it routes through the Cloudflare proxy. You need to view the relevant URL in the Network tab of the developer tools to see the headers included with the response.
It’s a little different than a TTL as there is no guarantee that it will be cached for the duration indicated. It is a maximum value that indicates that it should not be cached in excess of the specified timeframe.
It is not. The headers for the asset selected in your screenshot show the path of a file that is part of a browser extension installed on your computer and not a resource being loaded from Cloudflare.
Okay, thanks. Sorry, I realised that the image was from a browser extension I have, so that can be ignored.
There is no indication of cache ttl anywhere from what I can see, only the strict-transport-security, the max age for which has not yet elapsed. As I say, the original images have been removed, and only the CDNs remain - I don’t imagine the source images are being stored anywhere else, behind the scenes. But then I may be wrong.
You need to explicitly view the headers returned with the image asset that you are concerned with. If it is being served by Cloudflare, there is a very good chance that it is still present on the origin server of the site operator as that is where Cloudflare fetches content that is not found in the cache.