Skip to content

Comment on HTML minifier revisitedparent

Comments

Pays off? There might be little to gain from it, but on the other hand there is barely anything to lose. If you can shave 10% of your 200k pages in the couple of seconds the benchmarks took, I don't see why not.

barely anything to lose

It adds complexity to your setup and server side load. I would not call that barely anything.

Most developers already have a build system to concatenate and minify javascript and css files, plugging in the html minifier is straight-forward and doesn't add any additional complexity really. And since the minification is done at build time on a build machine (not request time on a production server), there is no impact on server side load.

If you were doing templating and dumping in data as I assume most server rendered pages are, it'd probably reduce server side load as you have fewer characters per template

I agree with you if you mean to say that it introduces complexity and server side load if you run it on a per-request basis. Considering the time it takes to minify, this obviously isn't the use case that the developers had in mind. Most likely it is meant to run as part of a build system of a mostly static website, and not on the server itself.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.