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:

add_filter('style_loader_tag', 'my_style_loader_tag');
function my_style_loader_tag($link) {
    return preg_replace("/id='.*-css'/", "", $link);
}

Similar Posts

Leave a Reply