URL prefetching means that Cloudflare pre-populates the cache with content a visitor is likely to request next. This setting — when combined with — leads to a higher cache hit rate and thus a faster experience for the user.
Enable Prefetch URLs
To enable Prefetch URLs in the dashboard:
Choose URLs to prefetch
To do this, include a Link HTTP response header pointing to a manifest file with the
rel="prefetch" attribute and then serve the manifest file with
text/plain as the Content-type response header.
Example HTTP response header:
Link: <http://www.example.com/manifest.txt>; rel="prefetch"
/static/fetch1 //other.example.com/fetch2 http://another.example.com/fetch3
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. If you reference HTML pages, only the HTML page itself will be pre-fetched - any sub-requests from that HTML will not be fetched unless they are also defined explicitly in your manifest.
Prefetch files limits
The prefetch files limits are the following:
- The maximum number of manifest files is 16.
- The maximum number of files per manifest file is 1024.
- A manifest file has a size limit of 1 MB.