Does Cloudflare Do Prefetching?
Yes. Enterprise customers can enable prefetching by turning on 'Prefetch URLs' in the Speed app of the Cloudflare dashboard, and including a list of URLs to prefetch in HTML headers.
What is Prefetching?
Prefetching means that Cloudflare pre-populates the cache with content a visitor is likely to request next. This guarantees a higher cache hit rate and thus a faster experience for the user.
How do I use Cloudflare's prefetching feature?
To use Cloudflare's prefetching feature, you must:
1. Turn on the Prefetch URLs setting under the Speed app in the Cloudflare dashboard.
2. Include an HTTP header in the response that links to a list of URLs to prefetch.
Cloudflare will prefetch the files listed in a manifest file. The manifest file is found in a Link HTML header with the rel=”prefetch” attribute.
Example HTTP response header:
Link: <http://www.example.com/manifest.txt>; rel="prefetch"
The manifest file should contain URIs, protocol-relative URLs or full URLs, separated by new lines. These files must be on your websites that are on Cloudflare.
What Content Can Be Prefetched?
Cloudflare can prefetch any content that is on your account and behind Cloudflare.
Who is Prefetching Available For?
Prefetching is available for all Enterprise customers. To upgrade to Enterprise, contact the Cloudflare team.