The page-load waterfall: DNS, TCP, TLS, HTTP request, TTFB, download, parse, render — each phase waiting on the last.
Pressing Enter doesn't fetch a page in one go. The browser runs a fixed line of phases — find the server, connect, secure it, ask, wait, download, draw — and each one only starts *after* the previous finishes. That serial dependency is why the delays stack up, and why making a page feel fast is mostly about shrinking this waterfall.
example.com) into a numeric IP address the network can route to. (The full mechanics live in the Networking module.)https, agree on encryption keys and verify the server's certificate, securing the channel. Adds one or two more round trips.GET / message. Cheap to send; the cost is the wait for the reply.Say each network round trip to the server takes 50ms. DNS costs one (~50ms), TCP one (~50ms), TLS two (~100ms), and then the request goes out. The server thinks for 80ms before the first byte returns — that 80ms is the TTFB. The 40KB of HTML then downloads in ~30ms, and parsing plus first paint takes another ~40ms. Total to first paint: roughly 350ms, of which nearly *two-thirds is setup and waiting* before a single byte of content arrives. Trim a redirect or a redundant handshake and you shave a whole round trip off the front.
<link rel="stylesheet"> and <script> tags that are render-blocking — it must fetch and process them before painting. Each one can add its own mini-waterfall, so a page with a slow stylesheet in the <head> stays blank long after the HTML is downloaded.The browser records the timestamp of every phase in the Navigation Timing API, so you can see the waterfall for a real visit rather than guessing.
const nav = performance.getEntriesByType('navigation')[0];
console.log('DNS ', nav.domainLookupEnd - nav.domainLookupStart);
console.log('TCP ', nav.connectEnd - nav.connectStart);
console.log('TTFB ', nav.responseStart - nav.requestStart);
console.log('Download', nav.responseEnd - nav.responseStart);