Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
in Plugins by
edited by
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(
            ' ',
        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?
Q2A version: 1.6.3 with SnowFlat

Please log in or register to answer this question.