Skip to main content
File compression
Last update:

File compression

File compression helps reduce source load and speed up content delivery. You can use one of two free types of compression:

These types of compression cannot be used together. Additionally, you can connect paid Image stack image compression. If you want faster downloads without compression, you can optimize delivery of large files instead of compression.

You can see the characteristics and compatibility of compression and optimization types in the Compression and Optimization Types Comparison table.

Comparison of compression and optimization types

Compression on CDN (Gzip)Compression on CDN (Brotli)Compression at sourceImage Compression
Image Stack
Optimize delivery of large files
What files are suitable forFiles larger than 128 B(list of formats)Files larger than 128 B (list of formats)Any filesImages .jpg and .pngFiles larger than 10 MB
How it worksContent is compressed using Gzip algorithm on CDN servers.Content is compressed using Brotli algorithm on shilding-server.Content is compressed using Gzip algorithm on source server.Images are compressed according to specified parameters on special Image Stack server, then sent to cache of CDN-servers.Files larger than 10 MB are uploaded to CDN-servers cache in 10 MB installments according to requests.
Need source shildingRecommended
Compatibility
  • compression on CDN (Brotli);
  • Image stack compression
  • CDN compression (Gzip);
  • Image stack compression
  • Optimizing delivery of large files;
  • CDN compression (Gzip, Brotli)
  • Image Stack image compression

Compression on CDN servers

Uncompressed content is requested from the source and will be compressed on the CDN server. If the user's browser does not send headers listing supported compression formats in the request to the CDN, such as Accept-Encoding: gzip, deflate, br, the content is delivered uncompressed.

You can enable GZip and Brotli compression, the minimum file size for compression is 128 bytes.

If you want to use Brotli compression, source shielding must be enabled for the resource, since the compression is performed on the shielding server.

You can use one of the algorithms or both. If both algorithms are enabled and supported in the browser, and the file format is supported by both algorithms, Brotli will be prioritized.

List of supported formats for compression

GZipBrotli
application/javascript
application/json
application/x-javascript
application/xml
application/xml+rss
application/vnd.ms-fontobject
application/x-font-ttf
text/css
text/html
text/javascript
text/plain
text/xml
image/svg+xml
image/x-icon

Enable GZip compression

  1. In Control Panel, go to CDNCDN Resources.
  2. Open the CDN resource page → Settings tab.
  3. Open the Content card.
  4. Check the GZip compression on CDN servers checkbox.
  5. Click Save. GZip compression will work within 30 minutes.

Enable Brotli compression

  1. Make sure to enable source shielding.
  2. In Control Panel, go to CDNCDN Resources.
  3. Open the CDN resource page → Settings tab.
  4. Open the Content card.
  5. Check the Brotli Compression checkbox.
  6. Click Save. Brotli compression will kick in within 30 minutes.

Compression at source

Files will be compressed at the source, and users will always receive compressed content. Content delivery time will be reduced as CDN servers will not take time to process the content.

Enable compression at source

  1. Make sure the source server is configured to compress files using the Gzip algorithm. If compression is using a different algorithm or is not configured, uncompressed content will always be given.
  2. In Control Panel, go to CDNCDN Resources.
  3. Open the CDN resource page → Settings tab.
  4. Open the Content card.
  5. Check the Compress files at source checkbox.
  6. Click Save. Compression on the source will kick in within 30 minutes.