CDN content prefetching
Prefetch requests files from the origin and stores them in CDN cache before visitors request them, so edge locations can serve the content without fetching it from the origin on the first request. A CDN resource is required.
Prefetch causes CDN servers to request the listed files from the origin, which increases origin load and traffic.
Prefetch is recommended for files larger than 200 MB and smaller than 5 GB. Each request is limited to 100 paths, and one prefetch request is allowed per CDN resource per minute. To prefetch more than 100 files, divide the paths into batches of up to 100 and wait at least 1 minute between batches for the same CDN resource.
Prefetch request
- 1
Open Prefetch
In the CDB Customer Portal, navigate to CDN > Prefetch.
- 2
Select the CDN resource
Select the resource whose origin holds the files. The dropdown shows each option as CNAME and ID.
- 3
Enter file paths
Enter one path per line without a domain, starting with a slash:
/path/file1.jpg.
- 4
Submit the prefetch request
Click Prefetch.
- 5
Confirm the files are cached
Prefetch processing time depends on the number and size of the files — allow time for the operation to complete before testing.
To verify, send a request to a listed path and inspect the
Cacheresponse header. The following command performs a GET request and prints only the response headers:curl -sS -D - -o /dev/null https://cdn.example.com/path/file1.jpgCache: HITmeans the file was already cached at that edge location when tested. To attribute the hit specifically to prefetch, test a new URL or purge the file before prefetching.Cache: MISSon the first request followed byCache: HITon the next means the first request filled the cache. That edge was not populated by prefetch — either prefetch has not yet completed, or that location was not reached.
To replace files that are already in cache, purge those files, then prefetch.
Prefetch requests are not retained in a history log and do not appear in purge history, which contains only cache-purge operations.