# ---------------------------------------------------------------------- # Gzip compression # ---------------------------------------------------------------------- php_flag zlib.output_compression On php_value zlib.output_compression_level 5 <IfModule mod_deflate.c> <IfModule mod_setenvif.c> <IfModule mod_headers.c> SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s,?\s(gzip|deflate)?|X{4,13}|~{4,13}|-{4,13})$ HAVE_Accept-Encoding RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding </IfModule> </IfModule> <IfModule filter_module> FilterDeclare COMPRESS FilterProvider COMPRESS DEFLATE resp=Content-Type /text/(html|css|javascript|plain|x(ml|-component))/ FilterProvider COMPRESS DEFLATE resp=Content-Type /application/(javascript|json|xml|x-javascript)/ FilterChain COMPRESS FilterProtocol COMPRESS change=yes;byteranges=no </IfModule> <IfModule !mod_filter.c> AddOutputFilterByType DEFLATE text/html text/plain text/css application/json AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript AddOutputFilterByType DEFLATE text/xml application/xml text/x-component </IfModule> <FilesMatch "\.(ttf|otf|eot|svg)$" > SetOutputFilter DEFLATE </FilesMatch> </IfModule>
This question has been answered by Seel-Media. See the first response.
php_flag zlib.output_compression 16386
zlib.output_compression is one, but when I disable it, the output is not compressed.How are you disabling it? Are you sure the php.ini does not have it on or are you setting it Off in the .htaccess?
Whats the other one...? Does MODX do any compression of uncached files? (Because this issue seems to be just with not [jet] cached resources.The other is the webserver compression being applied via that .htaccess excerpt you provided. MODX does not do any automatic compression like Drupal does as described in the link you provided.
How are you disabling it? Are you sure the php.ini does not have it on or are you setting it Off in the .htaccess?Default setting for zlib.output_compression in the php.ini is off. So when I delete
php_flag zlib.output_compression On
The other is the webserver compression being applied via that .htaccess excerpt you provided. MODX does not do any automatic compression like Drupal does as described in the link you provided.I thought DEFLATE is just for non-php files? So I have to add zlib.output_compression for php files. Not right? Also removing this mod_deflate part does not solve my problem.
Quote from: opengeek at Dec 20, 2011, 04:17 PMI thought it might be the culprit because it was being applied based on content types, of which MODX can serve any...The other is the webserver compression being applied via that .htaccess excerpt you provided. MODX does not do any automatic compression like Drupal does as described in the link you provided.I thought DEFLATE is just for non-php files? So I have to add zlib.output_compression for php files. Not right? Also removing this mod_deflate part does not solve my problem.
AddHandler fcgid-script .php .php5 FCGIWrapper /home/httpd/cgi-bin/php5-fcgi-starter.fcgi .php FCGIWrapper /home/httpd/cgi-bin/php5-fcgi-starter.fcgi .php5 AddOutputFilter DEFLATE html php css js