private function compress_html($html) {
$search = array(
'/\n/', // replace end of line by a space
'/\>[^\S ]+/s', // strip whitespaces after tags, except space
'/[^\S ]+\</s', // strip whitespaces before tags, except space
'/(\s)+/s' // shorten multiple whitespace sequences
);
$replace = array(
' ',
'>',
'<',
'\\1'
);
return preg_replace($search, $replace, $html);
}
The function at above exists in QA-Caching plugin however when I look the source of my website I see uncompressed HTML output while I am not logged. What sould I do to activate it?