-
Notifications
You must be signed in to change notification settings - Fork 17
Minify HTML #84
Comments
If this is a 2-line change to the Rationale: OK, this is just barely worth it. Even in pessimistic circumstances, the 12% savings might mean the difference between waiting 1 minute for the whole document and waiting 1 minute 7 seconds; or it might mean the difference between having a 35% chance of successfully downloading the whole document vs. a 40% chance. Changing the Python script to spit out minified HTML could likely be done by deleting code, rather than adding it, but an external tool is better. The output from Honestly, there are other ideas I'd rather see pursued to improve the download speed: change the script to generate multipage output, or a hypothetical fancy new JS-powered page that downloads the text incrementally. Maybe Markdown output, which would be more compact than HTML. But I'll take what I can get! |
Re: multipage output, ref. #5. |
@jorendorff To install the HTML minifier dependency using npm: npm install html-minifier -g Then, every time you build a new version of html-minifier --collapse-whitespace --remove-attribute-quotes --remove-redundant-attributes --prevent-attributes-escaping --use-short-doctype --remove-optional-tags es6-draft.html > es6-draft-minified.html I can submit a PR that adds this info to the README, but it might be better to create a |
I ran the entire page through my html-minifier — ES6 spec seems like a perfect candidate for it.
Here's the result:
Second colum is (more representative) gzipped comparison. So it's pure savings of 50KB (already accounting for gzip which is how the page is transferred) and it only takes ~3 sec to minify it as a one-time task.
There should be no differences in rendering.
What do you think? Worth it?
The text was updated successfully, but these errors were encountered: