You can save considerable bandwidth with tidy as well
Consider the following ran against a copy of the php.net home page:
Saving bandwidth with tidy
<?php
$opts = array("clean" => true,
"drop-proprietary-attributes" => true,
"drop-font-tags" => true,
"drop-empty-paras" => true,
"hide-comments" => true,
"join-classes" => true,
"join-styles" => true);
$tidy = tidy_parse_file("php.html", $opts);
tidy_clean_repair($tidy);
echo $tidy;
?>
After tidy is finished, compare the file sizes..
Before and after...
-rw-rw-r-- 1 john john 27066 Jan 3 04:11 php.html
-rw-rw-r-- 1 john john 26193 Jan 3 04:11 php_tidy.html
Without losing maintainability, tidy has saved 873 bytes per request
That might not seem like a lot, but when you serve 100,000 hits a day you save
87.3 megabytes a day in bandwidth.