Hi, I how do I make sure that my image is served from Cloudfare CDN, When we use Jetpack Photon, we find some prefix (wp1/wp0) to our own image url, but how to know it using cloudfare, how do I know my image is served from Cloudfare server ? The image url stays the same using cloudfare.
Take a look at the HTTP headers. Either with the DEV tools on chrome or with webpagetest.org
If an image was served from the cache you will find an entry „cache: HIT“
ya I got it , cf cache status - HIT , but some of my images is not served from Cloudfare, I get cache status - MISS . How can I force cloudfare to cache all my images in USA server, so that users from USA get it faster. Is there any way to induce image caching.
One more thing, I use a image compression wordpress plugin (imagify), it compress images just after an image is uploaded to my site. I just wonder if cloudfare cache the compressed version of the image or the original one.
This shouldn’t make any difference.
But new content isn’t cached immediately and not on all edges. It takes a few days depending on your plan. And -just a guess- the content is accessed frequently.
I also compress images upon upload to my Wordpress sites. Cloudflare caches the compressed image because this is what visitors would normally get when viewing your site.
Cloudflare isn’t a push cache, so we don’t pull an image until a user requests it from a given POP. If your plugin compresses the image before a user would have requested it, we’ll pull the compressed image.
wud u plz clarify a bit about Push or Pull Cache, Thnx a lot
The image won’t be served from Cloudflare until after someone has already requested (pulled) it.
For example, I use the LAX datacenter. If I visit a Cloudflare site and request image.jpg, now the LAX datacenter will have it in its cache. The next time in the near future someone uses LAX to visit that site, they will get image.jpg from cache.
But…someone using ORD datacenter won’t see it in the ORD cache.
Given enough traffic to your site, local datacenters will have that image cached for future visitors.
A PUSH means you preload all the images to cache. But Cloudflare doesn’t work this way.
Assuming a piece of content is cacheable Cloudflare will request (pull) an asset from the origin if it doesn’t already have it in cache at one of our POPs. Unless you’re using Argo’s tiered cache, that occurs on a per POP basis when a user visits. Once cached the item remains in cache until it expires (or is ejected for more frequently used content). With tiered cache (Argo) the process is basically the same except a subset of regional cache servers would be available to seed the content to other servers in region if it had the content (otherwise it too would get the content (pull) from the origin.
A push cache would be a system whereby you upload content to a CDN and it replicates it to the various notes. Since Cloudflare works in a transparent proxy mode we architected our system as a pull cache as we believe it provides the best balance of ease of use/ performance.
Thank u all for ur kind reply with lots of valuable information. Then it means atleast One user has to request an item to be cached for the first time(in his region). Is there anyway or bit of hacks/work around to induce such caching. What if I use some USA proxy or VPN to cache images in USA POP. If I surf my own site with USA proxy or VPN, isnt it supposed to be cached in USA POP ?
It’s very difficult to do because there are many POPs in the USA. You’re just going to have to rely on users visiting your site often enough to keep the cache refreshed.
This topic was automatically closed after 14 days. New replies are no longer allowed.