This article provides a high-level explanation of how Content Delivery Network functions as well as the file types compatible with CDN caching.
This tutorial assumes you have already created a pull zone.
Content Delivery Networks (CDNs) are usually used to cache files on their global networks to ensure fast file delivery to website viewers around the globe. The way a CDN works is clients request files via the CDN URL, which calls the files cached/saved on the CDN server. If the file is found, it is delivered right away, if not, the CDN server will “Pull” the file from its origin location, cache it, and deliver it.
The question is: "What types of file I can cache on CDN?" Technically, one can cache any type of file on CDN. But realistically, the CDN should be used to cache static files only. Static files are images, text files, stylesheets, HTML files, and so on. All files have headers; headers are lines of data that identify the file type, size, compression, expiry, etc… our CDN honors these headers of files when files are sent to CDN. To CDN, all files are “static”.
When setting up the headers on the webserver and preparing to send files to CDN for caching to speed up the website, remember which files should be cached, and which files should not be in cache.
Cacheable File Types
- video (mp4, avi, flv, mpeg, m4v...)
- audio (mp3, flac,...)
- packages/installation packages (exe, bin, pkg.tar.xz, deb, rpm...)
- archives (zip, tar, bzip, bz2, gzip, gz, tar.gz, tgz...)
- text files (css, html/htm, js, woff, ttf, woff2, otf,...)
- images (png, jpg, gif, jpeg, ...)
- documents (odf, xls, xlsx, doc, docx, ppt, pptx, xml,...)
Using Query String ( i.e: style.css?ver=123 ) is allowed.
Non-Cacheable File Types
It's recommended to use push zones for files larger than 10MB (or somewhere around that number - there is no fixed limit).
If you have any questions or experience any issues, please reach out to the Support Team, live chat and ticket support are available 24/7.