I have WP Super Cache running as well as WP Minify. WP Super Cache is supposed to take care of Gzip, but when I run Yslow on the site in questions it says 8 plain text files were not gzipped. Page in question is http://www.doede.net/2010/08/26/debuggen-van-je-wordpress-website/
I checked for gzip and deflate in phpinfo and found
HTTP_ACCEPT_ENCODING: gzip,deflate
So it should work on this server, right?
Well Gzip does run, but soemhow several files including .js and .css are not being gzipped. Some files are syntaxhighlighter files others are just simple files like a theme master.css file. Any ideas why?
With extra gzip rules
Gzip
RewriteEngine on
#Check to see if browser can accept gzip files. If so and we have it - serve it!
ReWriteCond %{HTTP:accept-encoding} gzip
RewriteCond %{HTTP_USER_AGENT} !Safari
#make sure there's no trailing .gz on the url
ReWriteCond %{REQUEST_FILENAME} !^.+\.gz$
#check to see if a .gz version of the file exists.
RewriteCond %{REQUEST_FILENAME}.gz -f
#All conditions met so add .gz to URL filename (invisibly)
RewriteRule ^(.+) $1.gz [QSA,L]
# If they accept gzip and there isn't one - make one
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_keep_workfiles No
mod_gzip_can_negotiate Yes
mod_gzip_add_header_count Yes
mod_gzip_send_vary Yes
mod_gzip_command_version '/mod_gzip_status'
mod_gzip_min_http 1000
mod_gzip_minimum_file_size 300
mod_gzip_maximum_file_size 512000
mod_gzip_maximum_inmem_size 60000
mod_gzip_handle_methods GET POST
mod_gzip_temp_dir /tmp
mod_gzip_item_include file \.html$
mod_gzip_item_include file \.php$
mod_gzip_item_include file \.pl$
mod_gzip_item_include file \.rb$
mod_gzip_item_include file \.py$
mod_gzip_item_include file \.cgi$
mod_gzip_item_include file \.css$
mod_gzip_item_include file \.js$
mod_gzip_item_include mime ^application/javascript$
mod_gzip_item_include mime ^application/x-javascript$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^httpd/unix-directory$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include handler ^server-status$
mod_gzip_item_include handler ^server-info$
mod_gzip_item_include handler ^application/x-httpd-php
mod_gzip_item_exclude mime ^image/.*
</IfModule>
and WP Super Cache I still have seven files that are not compressed. That is either because my rules do not work an or because WP Super Cache does not compress them. I am still talking about the same files which are loaded in posts like the one mentioned in the first post in this thread. The files in question are:
* wp-content/themes/d3/stylesheets/master.css
* /wp-content/plugins/syntaxhighlighter/syntaxhighlighter/styles/shCore.css?...
* wp-content/plugins/syntaxhighlighter/syntaxhighlighter/styles/shThemeDefault.css?...
* wp-content/plugins/wp-slimstat/wp-slimstat.js
* wp-content/plugins/syntaxhighlighter/syntaxhighlighter/scripts/shCore.js?...
* wp-content/plugins/syntaxhighlighter/syntaxhighlighter/scripts/shBrushPhp.js?...
* wp-content/plugins/syntaxhighlighter/syntaxhighlighter/scripts/shBrushPlain.js?...
* http://zulu.tweetmeme.com/button_ajax.js
Did another test and found out I do have mod deflate enabled, but not gzip enabled. Too Bad WP Super Cache works with Gzip and that Yslow checks for Gzip only.
Working now. Had to wait a bit and empty cache. Yslow recognized mod deflate and I have also improved expire headers. So the last remark that Ylos does not work with Mod Deflate is hereby dropped ;-)