mod_deflate: Excluding Binary MIME Types to Prevent Double Compression
0 reputation · 04 Oct 2024, 21:25 UTC
Goal
Ensure that the Apache mod_deflate module compresses only text‑based responses, preventing corrupted binary assets from being double‑compressed.
Constraint
While AddOutputFilterByType DEFLATE targets common text MIME types, the list of binary types to exclude is not exhaustive. An incomplete exclusion list may lead to broken images, PDFs, or archives.
Uncertainty
It is unclear which MIME types should be explicitly exempted in a given deployment, and how changes to the list affect CPU usage and perceived performance.
Questions
- Which binary MIME types should be added to the
mod_deflateexclusion list for a typical web application? - What verification steps can confirm that binary assets are served without
Content‑Encoding: gzip? - How does excluding large binary files impact server CPU and memory overhead when
mod_deflateis active?