Title: Edge cache file compression
Author: WordPress VIP Documentation
Published: May 7, 2024
Last modified: June 2, 2025

---

 1. [Infrastructure](https://docs.wpvip.com/infrastructure/)
 2. [Edge servers](https://docs.wpvip.com/infrastructure/edge-servers/)
 3. Edge cache file compression

#  Edge cache file compression

The [Brotli compression](https://developer.mozilla.org/en-US/docs/Glossary/Brotli_compression)
and [Gzip compression](https://developer.mozilla.org/en-US/docs/Glossary/GZip_compression)
methods are both supported and are applied to the responses of qualifying requests.

Brotli or Gzip compression is applied to:

 * Files that are stored in [the VIP File System](https://docs.wpvip.com/vip-file-system/)
   or deployed from [an application’s wpcomvip GitHub repository](https://docs.wpvip.com/wpcomvip-github-repository/)
   and are of the file type:  `css|js|json|xml|rss|svg|svgz|ico|txt|eot|ttf|atom`.
 * Responses that specify a [`Content-Length` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Length)
   and have a value of 500 bytes or greater.
 * Responses with [`chunked` transfer encoding](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Transfer-Encoding#directives).

The compression method that is applied to a file is dependent on the value of the`
Accept-Encoding` request header sent by the user’s client. If the  `Accept-Encoding`
request header includes both Brotli and Gzip (e.g. `Accept-Encoding: gzip, br`) 
the response will be compressed with Brotli.

Files larger than 1 GB will not have any compression applied to them and will not
be stored in the cache.

## Troubleshooting

Brotli compression might not work as expected for sites behind a [reverse proxy configuration](https://docs.wpvip.com/reverse-proxy/).
The `Accept-Encoding` header is typically handled by the reverse proxy provider 
before the request is forwarded to WPVIP’s [edge cache servers](https://docs.wpvip.com/infrastructure/edge-cache/).
Some reverse proxy providers ignore the `br` value of the `Accept-Encoding` header,
and only forward the `gzip` value. If Brotli compression is expected but not being
applied for responses from a site behind a reverse proxy, investigate adjustments
to settings at the reverse proxy layer to resolve the issue.

Last updated: June 02, 2025