Get AI summaries of any video or article — Sign up free
Why your website should be under 14kB in size thumbnail

Why your website should be under 14kB in size

The PrimeTime·
6 min read

Based on The PrimeTime's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

TCP slow start sends a small initial burst of packets and increases only after acknowledgements arrive, so early byte size affects load timing.

Briefing

A page that fits into roughly 14 kilobytes can load noticeably faster than a slightly larger one—often by hundreds of milliseconds—because TCP’s slow start ramps up sending conservatively at the start of a connection. The practical takeaway is simple: if the first request’s “critical” bytes (headers included) land within the first TCP window, browsers can begin rendering sooner, especially on high-latency or lossy networks.

The mechanism starts with how TCP works over IP. IP moves packets but doesn’t confirm delivery or track ports; TCP adds reliability by using acknowledgements. After a browser opens a connection and sends an HTTP request, the server doesn’t know the available bandwidth between the two endpoints. So TCP slow start begins with a small burst—commonly 10 TCP packets—then doubles the amount sent after acknowledgements arrive. If packets are lost or acknowledgements don’t return, the server backs off and sends more slowly. That “start small, then ramp” behavior is why tiny differences in total bytes can matter early in the load.

Where the 14 KB number comes from: Ethernet’s typical maximum transmission unit is about 1500 bytes. With TCP and IP headers consuming about 40 bytes total per packet (16 bytes for IP and 24 bytes for TCP), the payload per packet is about 1460 bytes. Multiply that by the initial slow-start packet count (often 10) and you land near 14,600 bytes—about 14 KB. The rule therefore isn’t just about the HTML body; it includes TCP/HTTP headers, which are uncompressed, and it’s meant for the first response that must be useful immediately.

Latency turns that early ramp into real user-perceived delay. Each TCP slow-start step depends on round trips: the browser must receive packets and send acknowledgements back before the server can send more. On satellite links, a single round trip can be on the order of hundreds of milliseconds. The transcript walks through a geostationary-style example: Earth-to-satellite and back adds roughly 120 ms each way, plus additional time to reach the server and return, plus processing. The resulting estimate lands around 612 ms per round trip, and HTTPS can add extra round trips before the first real payload. If a page requires multiple round trips to fetch its first resources, those delays compound.

That’s why the “14 KB rule” is treated as a performance target rather than a magic law. It’s most valuable when networks are slow, mobile, congested, or lossy—conditions that trigger packet loss and force additional retransmissions and round trips. The recommended strategy is to keep the first ~14 KB of the initial response capable of rendering something useful: critical CSS/JS and meaningful above-the-fold content, while deferring heavier assets. Compression (like gzip) can help pack more uncompressed content into the 14 KB budget, but base64-embedding images into HTML can bloat the payload.

The discussion also notes caveats: TCP slow start behavior varies by server and can start with more than 10 packets in some cases, and modern protocols like HTTP/2 and HTTP/3 don’t automatically eliminate the underlying “start conservatively” problem. Still, the core message holds: optimizing the first bytes matters, because TCP’s early ramp and round-trip latency determine how quickly a page becomes interactive.

Cornell Notes

TCP slow start makes the first phase of a connection conservative: servers start by sending a small number of TCP packets (often 10) and only increase after acknowledgements arrive. With typical Ethernet MTU (~1500 bytes) and TCP/IP headers (~40 bytes), each packet carries about 1460 bytes of payload, so 10 packets land near 14 KB. If the initial HTML/critical resources (including TCP/HTTP headers) fit within that early window, the browser can render sooner—sometimes by hundreds of milliseconds versus a slightly larger page. Latency and packet loss amplify the effect because each slow-start step depends on round trips and acknowledgements. The 14 KB target is therefore a practical rule of thumb for optimizing first-load performance, especially on high-latency or unreliable networks.

How does TCP slow start create a speed difference between a ~14 KB page and a ~15 KB page?

TCP begins a new connection without knowing available bandwidth, so it sends a small initial burst of packets (commonly 10). After the browser receives them, it sends acknowledgements; only then does the server increase the sending rate (often doubling). If the first response fits within the initial slow-start window, the browser can get critical bytes earlier in the ramp. If it spills into the next window, additional round trips are needed before more data can be sent, adding noticeable delay—reported as roughly ~612 ms faster in the transcript’s cited comparison.

Where does the “14 KB” figure come from in terms of packet sizing?

The typical Ethernet MTU is about 1500 bytes. TCP and IP headers consume about 40 bytes per packet (16 bytes for IP and 24 bytes for TCP), leaving about 1460 bytes of payload per TCP packet. If slow start starts with about 10 packets, 10 × 1460 ≈ 14,600 bytes—around 14 KB. The rule also includes TCP/HTTP headers in that budget, since those bytes are part of the first response and aren’t compressed the same way as content.

Why do round trips matter so much for first-page load time?

Each slow-start step depends on acknowledgements, which require the browser to receive packets and then send an ack back to the server. That means the server can’t safely ramp up without waiting for round-trip time. The transcript uses a satellite example to show how a single round trip can be hundreds of milliseconds on geostationary-style links, and it notes that HTTPS can add extra round trips before the first payload. Multiple round trips for early resources can therefore compound into large delays.

What network conditions make the 14 KB rule more important?

High latency (e.g., satellite links, long geographic distances) increases the cost of each round trip. Packet loss and noisy mobile networks also matter because lost packets trigger retransmissions, which require additional round trips. Even everyday Wi‑Fi congestion can degrade performance similarly. In these environments, sending less data earlier reduces the chance of spilling beyond the initial slow-start window and reduces the number of costly acknowledgement cycles.

What practical steps help meet the 14 KB target without breaking the site?

Keep the first ~14 KB of the initial response useful: inline or prioritize critical CSS/JS and above-the-fold text, and defer heavier assets. Load only what’s needed immediately, use placeholders for images, and avoid base64-encoding images into the initial HTML because it inflates size. Compression like gzip can help fit more uncompressed content into the 14 KB compressed budget. If fitting everything is impossible, the rule still functions as a “first bytes” priority guideline rather than a strict law.

Does HTTP/2 or HTTP/3 remove the relevance of TCP slow start?

Not automatically. The transcript notes that HTTP/2 and HTTP/3 don’t eliminate the underlying slow-start behavior in the way people might assume. It also mentions that QUIC (used by HTTP/3) is built on top of UDP, but the “start conservatively” problem still shows up in practice; QUIC recommendations reportedly align with the same 14 KB style guidance. The key point: modern transport changes don’t guarantee that early payload sizing stops mattering.

Review Questions

  1. If a server’s initial TCP slow start window were larger than 10 packets, how would that change the usefulness of a 14 KB target?
  2. Explain, step by step, how acknowledgements influence when a server can send more data during page load.
  3. Why can compression help with the 14 KB rule, but base64-embedding images can hurt?

Key Points

  1. 1

    TCP slow start sends a small initial burst of packets and increases only after acknowledgements arrive, so early byte size affects load timing.

  2. 2

    The ~14 KB figure comes from typical Ethernet MTU (~1500 bytes) minus TCP/IP headers (~40 bytes) times an initial slow-start packet count (often 10).

  3. 3

    Round-trip latency determines how quickly slow start can ramp; high-latency links make small inefficiencies much more expensive.

  4. 4

    Packet loss forces retransmissions and extra round trips, making “fit early” strategies more valuable on mobile and congested networks.

  5. 5

    The 14 KB budget includes TCP/HTTP headers and is meant for the first response’s critical bytes, not the entire page payload.

  6. 6

    Compression (e.g., gzip) can make more content fit within the 14 KB compressed budget, but base64-encoding images can bloat the initial response.

  7. 7

    The 14 KB rule is a rule of thumb: server behavior, caching, and protocol details can shift the exact threshold, but optimizing first bytes remains beneficial.

Highlights

A page around 14 KB can load hundreds of milliseconds faster than a slightly larger one because TCP slow start ramps up only after acknowledgements.
With ~1500-byte MTU and ~40 bytes of TCP/IP headers, each TCP packet carries ~1460 bytes of payload—10 packets lands near 14 KB.
On geostationary-style satellite paths, a single round trip can be estimated around 612 ms, turning early-load inefficiencies into major delays.
HTTPS can add extra round trips before the first payload, further increasing the cost of waiting for TCP ramp-up.
The most effective approach is to make the first ~14 KB render something useful (critical CSS/JS and above-the-fold content) while deferring everything else.

Topics

Mentioned

  • Guy Serino
  • TCP
  • IP
  • HTTP
  • HTTP3
  • QUIC
  • TLS
  • MTU
  • HTTPS
  • GZIP