Basic questions about image caching


#1
  1. How do I tell if CF is caching my images? (.jpg/.png/gif). I have used other CDNs in the past, and if I inspect element to find the source of a image, it would be on the CDN domain like cdn.hostingservers.com. However, I have turned on caching with cloudflare for few days now and all of my static images are still hosted on my site instead of cdn.cloudflare.com.

  2. When I purge all files, is there a progress bar of the new caching progress?


#2

1, The URL does not change with cloudflare DNS, it still points to your domain - only if the resource is cacheable (given your settings and page rules) - the cloudflare will return a cached version to the user - instead of pulling the resource from your origin. The easiest check is to tale a look at the headers; eg. with curl

curl -I "http://www.mydomain.xxx/img.jpg"

you should see something like this:

cf-cache-status: MISS (or HIT)

that should give you an indication whether you are serving cached versions from cdn.

  1. i think there is not - the resources are cached as your users are accessing them

#3

This topic was automatically closed after 14 days. New replies are no longer allowed.