> For the complete documentation index, see [llms.txt](https://clients.medianova.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://clients.medianova.com/products/performance-cdn/static-content-delivery/advanced-configuration/compression.md).

# Compression

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

Compression reduces the size of HTTP responses before they are delivered to clients. Medianova CDN supports **Gzip** and **Brotli** compression and selects the appropriate encoding based on the client request and CDN configuration.

<figure><img src="https://542970813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtK7oIwmhUHdEJcaH4Hx8%2Fuploads%2Fgit-blob-e889fb0284d2b20003f3456aa9378efd294fa45c%2Fmedianova-content-compression-diagram-bg-white.png?alt=media" alt=""><figcaption><p>Request and response compression at Medianova</p></figcaption></figure>

## Compression at the Edge

Medianova determines whether to deliver a response using Gzip, Brotli, or no compression based on:

* The `Accept-Encoding` header in the client request.
* The compression configuration of the CDN Resource.
* The content type and response size.

Gzip compression is performed at Medianova Midcache servers. The compressed response can then be cached and delivered through Edge servers.

Brotli compression is performed on the fly at Edge servers when supported by the client.

### Supported Content Types

You can configure which content types are eligible for Gzip and Brotli compression. `text/html` content is always compressed.

By default, Medianova compresses the following content types:

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

### Response Status Codes

Medianova can compress responses received from the origin or served from CDN cache regardless of the HTTP status code.

Some CDN features, such as Geo Blocking, can generate lightweight error responses directly at the edge. These edge-generated error responses are served without compression.

### Minimum Response Size

For eligible content types, compression is applied only when the response size is at least **400 bytes**.

### Content-Length

Medianova sends compressed responses without the `Content-Length` header to avoid providing a length value that may no longer represent the dynamically transformed response body.

### Cache-Control: no-transform

The following origin response directive does not disable CDN compression:

```
Cache-Control: no-transform
```

Compression behavior continues to follow the CDN Resource configuration.

## Compression at the Origin

Medianova requests uncompressed content from the origin server.

The CDN does not send an `Accept-Encoding` header to the origin and expects the origin response without a `Content-Encoding` header. Compression is then applied within the CDN according to the configured compression behavior.

## Compression Levels

Medianova uses the following compression levels:

| Encoding | Compression Level |
| -------- | ----------------: |
| Gzip     |                 6 |
| Brotli   |                 5 |

These levels balance compression efficiency and processing requirements.

## Cached Gzip Responses

Disabling Gzip does not immediately remove Gzip-compressed objects that are already stored in cache.

An existing compressed object may continue to be served until:

* The cached object expires.
* The object is purged from the CDN cache.

After the cached object is removed, subsequent responses follow the current compression configuration.

## Zstandard Support

Medianova does not currently support Zstandard (`ZSTD`) compression.

## Related Concepts

* [Purge](/products/performance-cdn/static-content-delivery/advanced-configuration/purge.md)
* [Caching](/api-documentation/performance-cdn/caching.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://clients.medianova.com/products/performance-cdn/static-content-delivery/advanced-configuration/compression.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
