Mod deflate vs mod filter
Installation and Configuration
Could there be something turning the filter module off, e,g, developer mode? According to sysadmin its not working but it does work if you switch to deflate.
According to sysadmin
>
> deflate module is installed and loaded by default already. To turn on compression for the content, AddOutputFilterByType directive should be used. And as I see, someone already tried to turn this on, but used the wrong module - one should use "mod_deflate.c" instead of "mod_filter.c". Here is exact working patch for .htaccess:
>
> --- .htaccess 2014-04-01 17:23:26.845800224 -0400
> +++ .htaccess.orig 2014-04-01 02:53:52.000000000 -0400
> @@ -15,7 +15,7 @@
>
>
> # Compress everything we can
> -
> +
> AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript text/javascript-x application/javascript
>
>
>
> I have tested this config and it works as expected:
>
> $ wget --header="Accept-Encoding: gzip,*" -S -O /dev/null
> http://dev.xtraxx.com/
> --2014-04-02 00:29:06-- http://dev.xtraxx.com/ Resolving dev.xtraxx.com... 23.23.111.58 Connecting to dev.xtraxx.com|23.23.111.58|:80... connected.
> HTTP request sent, awaiting response...
> HTTP/1.1 200 OK
> Date: Tue, 01 Apr 2014 21:23:32 GMT
> Server: Apache/2.2.15
> X-Powered-By: PHP/5.4.22
> Expires: Thu, 19 Nov 1981 08:52:00 GMT
> Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
> Pragma: no-cache
> Connection: close
> Set-Cookie: sess14d4c22aa091=freo2lo427ent8hsjdm833n267; path=/
> Vary: Accept-Encoding
> Content-Encoding: gzip
> Content-Length: 6401
> Content-Type: text/html; charset=utf-8
> Length: 6401 (6.3K) [text/html]
> Saving to: `/dev/null'
>
> 100%[===================================================================================================================> ] 6,401 --.-K/s in 0.1s
>
> 2014-04-02 00:29:09 (45.9 KB/s) - `/dev/null' saved [6401/6401]
>
>
>
> $ wget -S -O /dev/null http://dev.xtraxx.com/
> --2014-04-02 00:41:19-- http://dev.xtraxx.com/ Resolving dev.xtraxx.com... 23.23.111.58 Connecting to dev.xtraxx.com|23.23.111.58|:80... connected.
> HTTP request sent, awaiting response...
> HTTP/1.1 200 OK
> Date: Tue, 01 Apr 2014 21:35:46 GMT
> Server: Apache/2.2.15
> X-Powered-By: PHP/5.4.22
> Expires: Thu, 19 Nov 1981 08:52:00 GMT
> Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
> Pragma: no-cache
> Connection: close
> Set-Cookie: sess14d4c22aa091=751ro61u0a5l1q1if34vkp4kt6; path=/
> Content-Length: 51593
> Vary: Accept-Encoding
> Content-Type: text/html; charset=utf-8
> Length: 51593 (50K) [text/html]
> Saving to: `/dev/null'
>
> 100%[===================================================================================================================> ] 51,593 188K/s in 0.3s
>
> 2014-04-02 00:41:26 (188 KB/s) - `/dev/null' saved [51593/51593]
>
>
> Please draw attention to "Content-Encoding: gzip" and different "Content-Length" with and without compression in the above example. I haven't done any real changes to current content on the server and git repo as am waiting until we sort out all those things with ignores, pushes, commits. But in general, as I already stated, all that is needed to turn on compression is to use this code in .htaccess:
>
>
> AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
> text/javascript text/javascript-x application/javascript