4 ms·
Experimenting with html minifier
- ojbyrne 16y agoOne 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 16y agoBut 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.
- pepijndevos 16y agoIf 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 16y agoSo this minimizer looks like premature optimization.
- TrevorBurnham 16y ago...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?