Are files from other domains also being cached?

Hi! It’s just a question. I’m wondering if files from different domains are also being cached.

For example, I own example.com, so I added it to my account and contents inside (like example.com/orange.png) is being cached and served by CF (usual behaviour).

Now, let’s say, inside my index.html I’m also serving external content, like other-example.com/grape.png.

Will this “grape.png” be also cached and served from CF?

Thanks.

It won’t, unless of course that domain is on Cloudflare too.

After writing this comment I realized that resources are being individually requested by browser, so answer is not. However, how about if I set a cname to serve it? Like CNAME bla.example.com => other-example.com? More specific (it might not be the best example), I want Cloudfront to work together with Cloudflare. So, I can map with a CNAME (for example) f43f43f43.cloudfront.com to cdn.example.com. Then, URLs will be served like cdn.example.com/grape.png, that will be resolving to f43f43f43.cloudfront.com/grape.png, that will be resolving to example.com/grape.png, that will be served by Cloudflare cache. Is this mechanism possible?

If you point a record of your domain to that other server and that other server still answers under your domain, that would be part of your domain and hence cached.

Great, thanks!

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