h5bp/html5-boilerplate — pull request #1173 by alrra (2012-08-22 21:31:34+00:00)
Title: More general compression configuration for Apache

###### 1) Related discussion: #1012
###### 2) About the solution:
- Works with Apache ≥ 2.1 and requires `mod_deflate` and `mod_filter` to be enabled.
(personally, I don't think we should target lower as Apache < 2.2 is [no longer recommended](http://httpd.apache.org/docs/2.0))
- For Apache ≥ 2.1 → 2.3.7, `mod_filter` isn't needed, but I think requiring it and using this solution is the best way going forward (plus, it doesn't introduce other dependencies to other modules like, for example, [`mod_version`](http://httpd.apache.org/docs/current/mod/mod_version.html))

###### 3) Other information:

* Apache ≥ 2.3.7:
* `AddOutputFilterByType` was [moved into mod_filter](http://httpd.apache.org/docs/2.4/mod/mod_filter.html#addoutputfilterbytype), so the `` condition has to be present and / or `mod_filter` has to be enabled.
* Best solution:

```

# ...

AddOutputFilterByType DEFLATE application/atom+xml ...

```

* Apache ≥ 2.1 → 2.3.7:
* [`AddOutputFilterByType`](http://httpd.apache.org/docs/2.0/mod/core.html#addoutputfilterbytype) works without `mod_filter`, so there is no need to enable it or to have the `` condition.
* Best solution:

```

# ...
AddOutputFilterByType DEFLATE application/atom+xml ...

```

* Apache 2.0.33 → 2.1
* Apache < 2.2 is [no longer recommended](http://httpd.apache.org/docs/2.0)!
* [`AddOutputFilterByType`](http://httpd.apache.org/docs/2.0/mod/core.html#addoutputfilterbytype) works without mod_filter and [`mod_filter` doesn't work at all](http://httpd.apache.org/docs/2.2/mod/mod_filter.html).
* Best solution:

```

# ...
AddOutputFilterByType DEFLATE application/atom+xml ...

```