Live data from Hacker News

A 14kb page can load much faster than a 15kb page

endtimes.dev

141–150 of 356 posts

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

#141
post #131

A typical HTTPS RSA certificate is about 3.9kb. ECDSA certificates with ECDSA cross-signed with an RSA root will be around 2.9kb. So this 14kb of HTML response should leave some room for the certificates too.

HTTPS requires an extra couple of round trips (to do the handshake and exchange keys etc). I don't think the whole thing can be optimised to 1 round trip, unfortunately.

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

#142
post #131

A typical HTTPS RSA certificate is about 3.9kb. ECDSA certificates with ECDSA cross-signed with an RSA root will be around 2.9kb. So this 14kb of HTML response should leave some room for the certificates too.

Although isn't there a roundtrip between certificate exchange and actual data being transmited? So i would presume that wouldn't matter

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

#143

That's only doable with a text-centric website. I'm currently finishing a photography section for my personal website, and the gallery pages are several hundred kBs in size, while single photo page is almost 1MB in size (provided you load it on a 28" screen; browser will load smaller variants on smaller screens). Most of that weight is the thumbnails (and almost-full-size photo in the latter case). The only JS I have…

I dont really think it matters as long as all resources are present to layout the site (html, css, synchronous js). As long as the img tag have width and height specified so they dont cause a reflow when loaded, i dont think it matters if they load a little later.

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

#145
post #22

Shameless self-promotion: the homepage of plaintextsports.com is 5.2kb today [1], an in-progress WNBA game (4th quarter) is 11.2kb [2], and an extra inning MLB game is 8.8kb [3]. I wasn't aware of this size threshold, and I'm not at this level of optimization, but I'm always pleased to find more evidence of my playful claim that it's the "fastest website in the history of the internet". [1]: https://plaintextsports.c…

It's very small, but it's difficult to scan and painful to read. You could easily use built-in HTML structures to make it actually readable. Your site is, in my opinion, as much a deviation from the old readable web as the over-designed modern sites are. There are lots[1] of small, "class-less" CSS libraries that would keep your site as small (or smaller, with tree-shaking in a modern build system) and it would end u…

or at least a bigger font-size

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

#146
post #131

A typical HTTPS RSA certificate is about 3.9kb. ECDSA certificates with ECDSA cross-signed with an RSA root will be around 2.9kb. So this 14kb of HTML response should leave some room for the certificates too.

HTTPS requires an extra couple of round trips (to do the handshake and exchange keys etc). I don't think the whole thing can be optimised to 1 round trip, unfortunately.

It's possible, but not without security implications:

https://blog.cloudflare.com/introducing-0-rtt/

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

#147

Earlier quoted context omitted.

Bandwidth is extremely carbon intensive. Someone viewing a couple of few 25MP images online could use 20g to 100g of CO2 (depending on compression).

Source ?

https://www.emergeinteractive.com/insights/detail/does-irres...

In the US as of 2020, it was 3KG CO2 per GB Data.

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

#148
post #123

I like the idea mentioned in the article of increasing the number of packets sent in the slow start - as far as I know you could just crank that from the server side TCP stack to something much larger, right?

Yeah, now that most of us control the server, is this an option?

Never tried it, but its listed as an option at https://linux.die.net/man/8/ip

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

#149
post #93

Earlier quoted context omitted.

It's only 8kB compressed.

A fresh load of the page (according to Chrome) is 21.5kB transmitted, 59.1kB uncompressed. That's when loading with nothing cached. The HTML is just 7.9kB, but then the CSS is 2.2kB, JS is 2.3kB, and the favicon is 7.9kB which is a bit funny (but it's of course irrelevant for the actual page). HN could put the CSS and JS into the generated HTML file and still stay under 14kB for the initial load, which then would giv…

Favivon isn't blocking the initial request so it really shouldn't matter.

> HN could put the CSS and JS into the generated HTML file and still stay under 14kB

At the expense of caching those resources that stay static. With http/2 the benefit of merging into one resource should be negligible anyways.

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

#150
so the hot takeaway here is that CSS must absolutely be embedded in HTML header so that browser does not make two requests to start rendering page in question. Also if page is using TLS and it most likely is, this all falls apart because initial handshake will do at least one round trip and kill all the speed of loading resource.
Post reply on HN