chromium/hstspreload.org

Minify the HTML, JavaScript, and CSS code

Kenneth-Barber opened this issue · 4 comments

Please use minified versions of the HTML, JavaScript, and CSS code to reduce the page load time. For more optimizations, see the link below:
https://www.giftofspeed.com/

emilv commented

According to the web apge you linked to, the website is fully loaded within 600 ms. Pagespeed Insights also shows a 100% score on both desktop and mobile. I suggest we close this issue.

According to the web apge you linked to, the website is fully loaded within 600 ms. Pagespeed Insights also shows a 100% score on both desktop and mobile. I suggest we close this issue.

The website is loaded quickly only if you are in the US. Elsewhere, it takes 1 to 3 seconds. Also, minification isn't just about speed. It's about reducing the amount of data that needs to be sent to get the web page to load. Generally, minification is just good practice and should be done by every website by default (ideally) rather than done as seen fit.

Modern full-site minification often takes a fairly complicated pipeline, which can mean a lot of files, multiple toolchains, potential deployment hurdles, mismatch between development and production, portability/contributor barriers, vuln alert management, etc.

hstspreload.org currently already has a 100% Lighthouse score. That doesn't mean there's no room for improvement, but compared to a lot of other sites:

  • hstspreload.org has fairly few and light resources (<15kB total, excluding the favicon),
  • has a pretty readable and functional layout without CSS, and
  • is needed once in a while by developers, who on average will have serviceable internet and don't rely on the site to be lightning fast for their everyday work.

I think it might be worth trying to make sure the server sends gzip responses, but I would argue that trying to minify the resources would not be worth the maintainability cost.

I would also be surprised if minification would make a huge impact specifically outside the US. I gather that latency would be a bigger issue — slow connections in the US would have the same issue if 20kB vs. 10kB makes a big difference. If we want better performance outside the US, it would probably be better to use CDN functionality in Google Cloud, or to split out the static parts of the site into static hosting with a CDN in front — but I also think that's more maintenance trouble than warranted, unless we hear of specific issues way beyond 1-3 seconds that could be fixed this way. 1

Footnotes

  1. Since I live in the US, I can't talk that authoritatively about connections outside the US, though.

(Just to be clear: I'm not saying that it's bad to advocate for minification in general — it was good to ask! Many sites would benefit from shipping fewer bytes from the frontend, and minification can be a valuable tool for that. My argument was based on this particular situation.)