views:

374

answers:

4

Is there an equivalent of Google's Closure Compiler for HTML minimizing?

+1  A: 

I presume you mean the Closure compiler, which effectively compresses javascript. If you search the goog for "HTML Compressor", you will find a lot of options catering to individual needs.

Nick Bastin
+1  A: 

To minify markup without corrupting the content use my markupmin.js tool. You can demo it integrated into my Pretty Diff tool. Even the HTML source of the Pretty Diff tool and the documentation are both minified with this tool.

http://mailmarkup.org/prettydiff/prettydiff.html
http://mailmarkup.org/prettydiff/markupmin.js

A: 

I am using Minify to trim and compress the html at runtime. The only requirements and setup are that you put Minify on your server and prepend the following code to the page.

<?php require $_SERVER['DOCUMENT_ROOT'] . '/min/pageBuffer.php'; ?>
<!-- html -->
Dykam
+1  A: 

Consider HTML Tidy:

http://infohound.net/tidy/

It's a free tool that does a great job.

mattbasta