WebPagetest Forums
CSS & HTML Minification checks - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Feature Suggestions (/forumdisplay.php?fid=9)
+--- Thread: CSS & HTML Minification checks (/showthread.php?tid=35)



CSS & HTML Minification checks - calumfodder - 07-31-2009 08:55 PM

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


RE: CSS & HTML Minification checks - pmeenan - 07-31-2009 09:40 PM

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


RE: CSS & HTML Minification checks - calumfodder - 07-31-2009 10:12 PM

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?


RE: CSS & HTML Minification checks - pmeenan - 08-01-2009 03:14 AM

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


RE: CSS & HTML Minification checks - calumfodder - 08-04-2009 02:14 AM

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

Had no luck finding anything better than HTML Tidy.


RE: CSS & HTML Minification checks - pmeenan - 08-04-2009 02:32 AM

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