Your experience with Cloudflare Prefetching

We are considering using Cloudflare’s Prefetching with our Enterprise Cloudflare account as described here: support.cloudflare.com/hc/en-us/articles/206776707

Our plan is to try this with a couple of our larger minified .js files and our standard .css file. But these are cached with a TTL of 31 days so we really wonder if prefetch will provide any significant improvement.

How do you take advantage of Prefetch? What has your experience been? Is it worth the effort? Thanks!

Even if TTL is 31 days, it doesn’t mean it’s already in Cloudflare cache for a visitor.

Prefetch will make sure the Cloudflare edge cache your visitor is going to hit will already have that resource cached by the time their browser requests it.

It’s not that much effort. I only use one manifest file, and that’s for a few specific universal resources on the site.

I’m using Cloudflare prefetch with my Enterprise plan and it does help as CF CDN cache is per datacenter. So even if TTL is 31 days cache, it’s per datacenter so there’s 200+ cache miss hits for each CF datacenter at least. With prefetch caching, all 200+ CF datacenters are prewarmed up so expect alot more requests/traffic to your origin from each region.

I was not aware of that. Are you saying that if I put that prefetch manifest in my site’s header, that every edge node will preload the cache just because someone hitting my site through SEA?

Yup, from my origin logs I see Cloudflare-Prefetch user agent requests from many CF datacenters which drives up CF reported request count too - so be careful if you have also enabled Argo as CF Prefetch cache will increase your Argo bandwidth costs :slight_smile: I reduced my prefetch manifest.txt urls to just assets which make up the initial above fold render of a web page to speed up Google Core Web Vital metrics for FCP, LCP which relate to your critical render path :slight_smile:

1 Like

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