News for hackers. Stuff that matters.
Re:Delivering WordPress in 7kb by ryanworl on Thursday July 12, 2018 @09:23AM (#17514171)
It depends on if you're loading from multiple origins (multiple TCP connections), HTTP 1.1 vs 2 (multiplexing, push, HOL blocking), but generally speaking: yes. If you can fit the content needed to render the page in the initial TCP congestion window, the page will be noticeably faster on high-latency connections.

This unfortunately means, for most websites, some amount of CSS in a style tag in the head to get a basic structure of the page together to start rendering. Then you also include a full stylesheet with the high-fidelity version.

I'm leaving out a lot of details here :)

Re:Delivering WordPress in 7kb by nattaylor on Thursday July 12, 2018 @09:48AM (#17514489)
Thanks for the explanation!

I have done things on my site like inlining CSS and minimizing requests because it feels fast, without knowing exactly why. I didn't know that a single request can actually have multiple round trips!

My WordPress homepage is 2.4kb gzipped and just a single request :) so it is fast but its, uhh, a little boring and only 158 words.

Re:Delivering WordPress in 7kb by blattimwind on Thursday July 12, 2018 @11:33AM (#17515591)
> I didn't know that a single request can actually have multiple round trips!

If you load something from a third-party origin (e.g. 23789dz89asd789s.cloudfront.something), then it can actually be a lot worse than that. DNS needs resolving, which can take quite a while, depending on if and where things are cached. Then you get a full TCP handshake (since TFO doesn't work for the first connection), a full TLS handshake and then you get to roundtrip your request(s).