Live data from Hacker News

A 14kb page can load much faster than a 15kb page (2022)

endtimes.dev

251–260 of 324 posts

Re: A 14kb page can load much faster than a 15kb page (2022)

#251
post #97
post #94

Earlier quoted context omitted.

Talking about video streaming, I have a question for big tech companies: Why? Why are we still talking about optimising HTML, CSS and JS in 2025? This is tech from 35 years ago. Why can't browsers adopt a system like video streaming, where you "stream" a binary of your site? The server could publish a link to the uncompressed source so anyone can inspect it, keeping the spirit of the open web alive. Do you realise ho…

That’s already how it works. The binary is a compressed artefact and the stream is a TLS pipe. But the principle is the same. In fact videos streams over the web are actually based on how HTTP documents are chunked and retrieved, rather than the other way around.

I see, I didn't know this

Re: A 14kb page can load much faster than a 15kb page (2022)

#252
post #94

Earlier quoted context omitted.

Talking about video streaming, I have a question for big tech companies: Why? Why are we still talking about optimising HTML, CSS and JS in 2025? This is tech from 35 years ago. Why can't browsers adopt a system like video streaming, where you "stream" a binary of your site? The server could publish a link to the uncompressed source so anyone can inspect it, keeping the spirit of the open web alive. Do you realise ho…

> Why can't browsers adopt a system like video streaming, where you "stream" a binary of your site? I'll have to speculate what you mean 1. If you mean drawing pixels directly instead of relying on HTML, it's going to be slower. (either because of network lag or because of WASM overhead) 2. If you mean streaming video to the browser and rendering your site server-side, it will break features like resizing the window…

Thanks for explaining this in such detail

Re: A 14kb page can load much faster than a 15kb page (2022)

#253
post #53

Earlier quoted context omitted.

Please though, for the love of dog, have your site serve a complete chain and don't have the browser or software stack do AIA chasing.

With half of the web using Let's Encrypt certificates, I think it's pretty safe to assume the intermediates are in most users' caches. If you get charged out the ass for network bandwidth (i.e. you use Amazon/GCP/Azure) then you may be able to get away with shortened chains as long as you use a common CA setup. It's a hell of a footgun and will be a massive pain to debug, but it's possible as a traffic shaving measur…

The issue with the lack of intermediates in the cert isn't browsers (they'll just deal with it). Sure, if they aren't already in the cache then there's a small hit first time. The problem is that if your SSL endpoint is accessed by any programming language (for example, you offer image URL to a B2B system to download so they can perform image resizing for you, or somesuch) then there's a chance the underlying platform doesn't automatically do AIA chasing. Python is one-such system I'm aware of, but there are others that will be forced to work around this for no net benefit.

Re: A 14kb page can load much faster than a 15kb page (2022)

#254

Earlier quoted context omitted.

Engineering-wise, it sometimes isn't. But it does send a signal that can also become a trend in society to be more respectful of our energy usage. Sometimes, it does make sense to focus on the most visible aspect of energy usage, rather than the most intensive. Just by making your website smaller and being vocal about it, you could reach 100,000 people if you get a lot of visitors, whereas Google isn't going to give…

So, literally virtue signaling? And no, a million small sites won't "become a trend in society".

You really don't know if it could become a trend or not. Certainly trends happen in the opposite direction, such as everyone using AI. I think every little difference you can make is a step in the right direction, and is not virtue signalling if you really apply yourself across all domains of life. But perhaps it is futile, given that there are so many defeatist individuals such as yourself crowding the world.

Re: A 14kb page can load much faster than a 15kb page (2022)

#255

14kB is a stretch goal, though trying to stick to the first 10 packets is a cool idea. A project I like that focuses on page size is 512kb.club [1] which is like a golf score for your site’s page size. My site [2] came in just over 71k when I measured before getting added (for all assets). This project also introduced me to Cloudflare Radar [3] which includes a great tool for site analysis/page sizing, but is mainly…

A question as a non user: What are you doing with the extra 500kB for me, the user? > 90% of the time in interested in text. Most of the reminder vector graphics would suffice. 14 kB is a lot of text and graphics for a page. What is the other 500 for?

I use it for fonts. My website [0] consists of about 15kB of compressed HTML + CSS and 200kB of fonts.

[0] https://wyczawski.dev/

Re: A 14kb page can load much faster than a 15kb page (2022)

#256

Earlier quoted context omitted.

The vast majority of internet bandwidth is people streaming video. Shaving a few megs from a webpage load would be the tiniest drop in the bucket. I am all for efficiency, but optimizing everywhere is a recipe for using up the resources to actually optimize where it matters.

I feel this way sometimes about recycling. I am very diligent about it, washing out my cans and jars, separating my plastics. And then I watch my neighbour fill our bin with plastic bottles, last-season clothes and uneaten food.

Recycling is mostly a scam. Most municipalities don't bother separating out the plastics and papers that would be recyclable, decontaminating them, etc. because it would be too expensive. They just trash them.

Re: A 14kb page can load much faster than a 15kb page (2022)

#257

Damn... I'm at 17.2KB for my home page! (not including dependencies) FWIW I optimised the heck out of my personal homepage and got 100/100 for all Lighthouse scores. Which I had not previously thought possible LOL Built in Rails too! It's absolutely worth optimising your site though. It just is such a pleasing experience when a page loads without any perceptible lag!

I did a lot of work optimizing the template code we use on thousands of sites to get to 100/100/100/100 scores on Lighthouse. We also score perfect 100s on mobile too. It was a wild adventure.

Our initial page load is far bigger than 17.2KB, it's about 120KB of HTML, CSS, and JS. The big secret is eliminating all extra HTTP requests, and only evaluating JS code that needs to run for things "above the fold" (lazy-evaluating any script that functions below the fold, as it scrolls into view). We lazy-load everything we can, only when it's needed. Defer any script that can be deferred. Load all JS and CSS in-line where possible. Use 'facade' icons instead of loading the 3rd-party chat widget at page load, etc. Delay loading tracking widgets if possible. The system was already built on an SSR back-end, so SSR is also a big plus here. We even score perfect 100s with full-page hires video backgrounds playing at page load above-the-fold, but to get there was a pretty big lift, and it only works with Vimeo videos, as Youtube has become a giant pain in the ass for that.

The Google Lighthouse results tell you everything you need to know to get to 100 scores. It took a whole rewrite of our codebase to get there, the old code was never going to be possible to refactor. It took us a whole new way of looking at the problem using the Lighthouse results as our guide. We went from our customers complaining about page speeds, to being far ahead of our competition in terms of page speed scores. And for our clients, page speed does make a big difference when it factors into SEO rankings (though it's somewhat debatable if page speed affects SEO, but not with an angry client that sees a bad page speed score).

Re: A 14kb page can load much faster than a 15kb page (2022)

#258

Earlier quoted context omitted.

Well, half of a second is a small difference. So yeah, there will probably be better things to work on up to the point when you have people working exclusively on your site. > This is why almost all applications and websites are slow and terrible these days. But no, there are way more things broken on the web than lack of overoptimization.

> half a second is a small difference I don’t even know where to begin. Most of us are aiming for under a half second total for response times. Are you working on web applications at all?

> Most of us are aiming for under a half second total for response times.

I know people working on that exist. "Most of us" is absolutely not, if they were so many, the web wouldn't be like it's now.

Anyway, most people working towards instantaneous response aren't optimizing the very-high latency case where the article may eventually get a 0.5s slowdown. And almost nobody gets to the extremely low-gain kinds of optimizations there.

Re: A 14kb page can load much faster than a 15kb page (2022)

#259
post #7

The overlap of people that don’t know what TCP Slow Start is and those that should care about their website loading a few milliseconds faster is incredibly small. A startup should focus on, well, starting up, not performance; a corporation large enough to optimise speed on that level will have a team of experienced SREs that know over which detail to obsess.

When your approach is "I don't care because I have more important things to focus on", you never care. There's always something you can do that's more important to a company than optimising the page load to align with the TCP window size used to access your server. This is why almost all applications and websites are slow and terrible these days.

> This is why almost all applications and websites are slow and terrible these days.

The actual reason is almost always some business bullshit. Advertising trackers, analytics etc. No amount of trying to shave kilobytes off a response can save you if your boss demands you integrate code from a hundred “data partners” and auto play a marketing video.

Blaming bad web performance on programmers not going for the last 1% of optimization is like blaming climate change on Starbucks not using paper straws. More about virtue signaling than addressing the actual problem.

Re: A 14kb page can load much faster than a 15kb page (2022)

#260
post #188

> Once you lose the autoplaying videos, the popups, the cookies, the cookie consent banners, the social network buttons, the tracking scripts, javascript and css frameworks, and all the other junk nobody likes — you're probably there. How about a single image? I suppose a lot of people (visitors and webmasters) like to have an image or two on the page.

As long as your page doesn’t wait for that image, your page is going to be shown faster if it is 14kb.
Post reply on HN