Minify Style Sheet
To minify your front end style sheet:
-
Open the style sheet file:
Version 2.8x: This is the style.php file in the main public site folder.
Versions earlier than 2.8: This is the stylecss.php file in the /enc/ folder.
-
Almost at the bottom of the page, find the line:
if ($showstyle == "yes")
-
Just above that line, add:
// MINIFY STYLE
$styleinfo = str_replace(array(" ", " ", " ", " "), ' ', $styleinfo);
$styleinfo = preg_replace("/( ){2,}/", " ", $styleinfo);
$styleinfo = preg_replace('!/*[^*]**+([^/][^*]**+)*/!', '', $styleinfo);
$styleinfo = preg_replace('/ss+/', ' ', $styleinfo);
$styleinfo = trim($styleinfo); -
Save and reload the page.