I've found that whitespace between HTML tags can bloat the file considerably. After reading around, I used my new found knowledge and came up with this one-liner you can use a the top of any page with HTML output to strip out the whitespace from between tags:
I'm posting this for those who need it, and also to inquire, does anyone know how to optimize this further (in accuracy/efficiency/etc.)PHP Code:ob_start(function($buffer){ return preg_replace("/(>\s+<)/", "><", $buffer); });




Reply With Quote