

Experimenting with html minifier - pan69
http://perfectionkills.com/experimenting-with-html-minifier

======
pepijndevos
If you look at the difference in gzipped size, there is not so much
difference. Is it all really worth it? The way gzip works means that a
repetitive sequence of newlines and tabs will likely be only one char in the
final output.

~~~
eru
So this minimizer looks like premature optimization.

------
ojbyrne
One of the things I've thought would be interesting to try, would be if you
could reduce class and id names to 1 or 2 character strings a la javascript
minifiers. You'd have to do globally across all html files, and linked css and
js files, so it would be a bit challenging.

~~~
eru
But aren't class and id names part of the (extended) user interface? Users are
expected to be able to write their own CSS spreadsheets for your site.

~~~
ojbyrne
Good point. Though they still could, right? As long as the class/id names were
always "minified" to the same one or two letters.

~~~
eru
That would be the minimum. Meaningful names would be even better, though.

------
TrevorBurnham
_...minifying XHTML documents (given that they’re actually served to clients
properly, with “application/xhtml+xml”) doesn’t reduce size as much as if they
were HTML._

I don't understand. Why can't the size of XHTML documents be reduced as much
as HTML ones? And why would the MIME type matter?

~~~
tl
HTML is more liberal about missing close tags, so minifying HTML should
include removing those tags when the page is pushed to the browser.

~~~
83457
Also for attributes. One of his first code examples shows this.

<input disabled="disabled">

to

<input disabled>

