Website performance and delivery · Article 0339
How to Diagnose Brotli compression not being applied
Use this evidence-first guide to diagnose the specific symptom, make the smallest justified change, and confirm that the original workflow is restored.
What the symptom usually means
This symptom is a clue, not a diagnosis. For “How to Diagnose Brotli compression not being applied,” the cause may sit in configuration, routing, application behavior, or an upstream service. Confirm the failing layer from the response and logs before changing settings.
Compression checks
- Send a request with Accept-Encoding: br, gzip and inspect the response's Content-Encoding, Vary, and Content-Length/transfer size. Confirm the response is eligible for compression.
- Check whether compression is applied at the origin, reverse proxy, or CDN and avoid configuring conflicting layers that double-compress or strip headers.
- Test HTML, CSS, and JavaScript separately and verify the response body remains valid; do not infer success solely from a control-panel toggle.
Checks to run first
- Reproduce the issue and record URL, timestamp, device/browser, expected and actual results, and recent changes.
- Inspect browser Network/Console tools and application/hosting logs for the first relevant failure.
- Compare with a known-working page, user, device, or request to narrow the difference.
- Change one evidence-supported setting or component at a time and preserve the original value for rollback.
Measure before changing performance settings
Use these checks to isolate the specific failure described in this guide.
Step-by-step troubleshooting
- Inspect the request's Accept-Encoding header and the response's Content-Encoding header for HTML, CSS, and JavaScript. Confirm the client and intermediary negotiate Brotli rather than assuming the server setting alone is sufficient.
- Check whether the CDN or reverse proxy supports Brotli and whether it compresses at the edge or forwards the origin's encoding. Compare a cache miss and a cache hit, including Vary: Accept-Encoding behavior.
- Enable Brotli only at the layer that owns response compression and avoid sending Brotli bytes without Content-Encoding: br. Check that compressed responses are not cached under a key that ignores encoding negotiation.
- Fetch the response with a Brotli-capable client and verify the browser decodes it, the expected header is present, and transfer size is reasonable.
How to verify the fix
- Confirm Brotli is negotiated correctly and the response decodes with Content-Encoding: br.
- Test at least one nearby workflow that should remain unaffected.
- Check for a new error in the browser console, application log, or provider dashboard.
- If a cache or DNS TTL is involved, allow the relevant cache/TTL interval and verify from more than one path before concluding that the change failed.
Common mistakes to avoid
- Changing several settings at once, which prevents you from identifying the cause.
- Deleting content, resetting the database, or disabling security controls before evidence justifies that action.
- Using broad permission changes such as making every file writable, or exposing debugging output and secrets to public visitors.
- Assuming the homepage working proves that forms, admin pages, APIs, redirects, and other URLs also work.
- Repeatedly clearing every cache or changing DNS while the underlying origin/configuration is still wrong.
If the problem continues
Escalate with the exact affected URL, timestamp and time zone, response/error code, steps to reproduce, recent changes, and a sanitized log excerpt or request ID. Tell the host or software provider what you tested and what changed. Ask them to check the layer you cannot access rather than requesting a broad reset.
For provider-specific values, version-sensitive behavior, or commands, confirm the instructions in the official documentation for your exact hosting plan and software version before applying them. This guide intentionally avoids destructive one-size-fits-all commands because the correct action depends on the evidence and environment.