News for hackers. Stuff that matters.
Re:DuckDuckGo Lite by corobo on Friday January 17, 2020 @07:06PM (#22081067)
Does HTML ever need minifying? Serving using compression would handle it wouldn’t it?
Re:DuckDuckGo Lite by curben on Saturday January 18, 2020 @12:58AM (#22082644)
html minifer mostly just remove the whitespaces. Compression (gzip or brotli) preserves the source, i.e. decompressed file is exactly the same as the original's; whereas minifier alters the source.
Re:DuckDuckGo Lite by corobo on Saturday January 18, 2020 @05:25AM (#22083605)
Well that’s what I mean. Minifying css/js makes sense as it usually includes a concatenation stage.

Minifying HTML just makes your page source slightly harder to look at. Whitespace would be squashed into almost nothing with in-transit compression.

Probably something nobody ever needs to think of, but as a web dev it’s an argument I’ve had more than once!