Compression

Learn all about Gzip and Brotli compression at Medianova, including which content types are compressed by default and compression of error responses.

Gzip and Brotli compression reduces file sizes by up to 80% for common content types like HTML, CSS and JavaScript, leading to faster load times and improved user experience. This not only enhances website performance and improves SEO / Core Web Vitals, but also decreases bandwidth usage, saving CDN costs and ensuring efficient content delivery.

Request/response compression at Medianova

Compression at the Edge

Gzip compression happens at Medianova Midcache servers, which is then passed on to the Edge servers. Both the Midcache and Edge servers may cache the Gzip compressed content for faster delivery of next responses. Edge servers perform Brotli compression on-the-fly when requested by the client.

Medianova delivers content with Gzip compression, Brotli compression or no compression depending on:

  • Values of the Accept-Encoding header in the request coming into Medianova

  • Your Medianova configuration (learn how to configure Gzip and Brotli)

Content types

You can customize which content types Medianova serves compressed for Gzip and Brotli, except for content of type text/html : this is always compressed.By default, Medianova compresses the following content types:

text/html
text/plain
text/css
text/x-component
text/javascript
application/javascript
application/x-javascript
application/json
text/xml
application/xml
application/rss+xml
application/atom+xml
application/rdf+xml
application/xhtml+xml
application/vnd.ms-fontobject
application/x-font
application/x-font-opentype,
application/x-font-otf
application/x-font-truetype
application/x-font-ttf
font/opentype
font/otf
font/ttf
font/woff
font/woff2
image/svg+xml
image/x-icon
application/x-www-form-urlencoded
application/dash+xml
application/x-mpegURL
application/octet-stream

Status Codes

For responses coming from customer origin server or CDN cache, Medianova performs compression for any status code.Some MN features like Geoblocking may cause MN CDN to serve lightweight, edge-generated error responses and these are always served uncompressed.

Minimum response size for compression

If compression is enabled for the requested content type, Medianova applies compression to responses with a minimum size of 400 bytes.

Content-Length and No-Transform

Medianova sends compressed responses without the Content-Length header to prevent browsers receiving possibly incorrect length information as a result of dynamic transformation.

Sending Cache-Control: no-transform on the response from origin has no effect on compression.

Compression at Origin

Medianova always requests uncompressed content from the customer origin server. The CDN sends no Accept-Encoding header to the origin and expects to receive the response uncompressed and without a Content-Encoding header.

FAQ

Which compression level does Medianova use for Gzip and Brotli?

MN uses compression level 6 for Gzip and 5 for Brotli. These compression levels provide an optimal balance between compression efficiency and server CPU consumption.

After I disable compression, does Medianova continue to serve compressed from cache?

Yes. When a request is first made, Medianova servers cache the content Gzip compressed. If Gzip is later disabled, the already cached Gzip version will still be served unless a purge is performed or the cached object expires.

When will Medianova support Zstandard (ZSTD) compression?

Currently, Medianova has no plans for supporting Zstandard-encoded content.

Last updated

Was this helpful?