CSS & HTML Minification checks

I would like to see CSS and HTML files added to the minification checks.

Do you happen to know of any libraries (preferably c code) that can do the minification? I use jsmin for the javascript check and it is very reliable. I had html tidy implemented last year but it was less reliable and some pages it stripped out all of the actual page content.

Thanks,

-Pat

I have been using yui compressor (http://developer.yahoo.com/yui/compressor/) for both JS and CSS compression. - Java
Also there is CSS Tidy (http://csstidy.sourceforge.net/) - C++

HTML Tidy is one that I have been exploring but have come across problems with it as well.

I’ve seen a couple of php based HTML minifiers such as one included in web-optimizator (http://code.google.com/p/web-optimizator/) but I am actively looking for a suitable minification tool for HTML.

Do you know of any others other than HTML Tidy?

I’ll take a look at CSS tidy, that may work well (and CSS is well enough defined that it’s not really risky, unlike html).

For HTML, one of the things I looked at was just checking for whitespace at the beginning of lines in the html (and blank lines) and flagging it as not minified but that doesn’t tell you how much smaller it could be.

Thanks,

-Pat

Have come across a css minifier written in C (http://mabblog.com/cssoptimizer/)

Had no luck finding anything better than HTML Tidy.

Thanks. I actually used c more as a generic c/c++. Pagetest is all c++ so integrating either will work. I’ll take a look at both of them and get it integrated as soon as I can (as well as the gif->png8 check).

Thanks,

-Pat