Skip to content

Edge cache file compression

The Brotli compression and Gzip compression methods are both supported and are applied to the responses of qualifying requests.

Brotli or Gzip compression is applied to:

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. The Accept-Encoding header is typically handled by the reverse proxy provider before the request is forwarded to WPVIP’s edge cache servers. 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: May 07, 2024

Relevant to

  • Node.js
  • WordPress