Hyper Cache and Google PageSpeed Combine CSS

If you have a server with installed pagespeed module, you should disable the compression feature of Hyper Cache (and of any other caching plugin!). While it saves a lot of processing time, since the compressed page is stored in cache and served directly, that blocks few of pagespeed optimization like the CSS combine filter.

Page are still sent to the client in a compressed format, but they will be compressed on the fly by pagespeed (or better by the deflate module of Apache).

Anyway this is not enough: since WordPress adds CSS with an “id”, pagespeed refuses to merge them because this id could be used by JavaScript. Usually this is not the case and you should at least try to remove the id from the generated CSS links by WordPress.

On the latest version of Header and Footer I added a flag to remove that id from the CSS references, or you can use a snippet of code like the one below in your theme functions.php:

My excuses for my bad english but it's the only way I have to communicate with you. Would you suggest a correction? Leave a comment, thank you!

Leave a Reply