Topics / web

Web and networking

Everything between a URL and a pixel: the protocols that carry bytes across the internet and keep them private and fresh, and the browser machinery that turns them into a page.

Dives
12
Levels
113
Notes
10
Reading
8.8h
Start with DNS
How to read thisEvery line is a diveEach tick is one level, drawn at the layer of the stack it explains. Longer lines go further down, from why a thing exists to the silicon that runs it.12 dives · 113 levels

The path

Read in this order and each dive leans on the ones before it. Every dive also stands on its own.

  1. 01

    DNS, before there is an address

    Your laptop knows a name. The network needs an address. Follow a café Wi-Fi lookup through delegation, caches, signed answers and encrypted transports, down to every byte on the link.

    Idea to Machine

    43 min10 levels

  2. 02

    HTTPS, before the first GET

    One round trip to agree on keys, prove a server’s identity and hide an HTTP request. Follow TLS 1.3 from the first visible byte to the silicon doing the encryption.

    Idea to Silicon

    42 min11 levels

  3. 03

    A passkey, from the button to the chip

    Ana signs in without sharing a secret. Follow her passkey from a phone to a laptop, through the browser’s origin checks, a real signature, the USB frames and the hardware boundary that protects the key.

    Idea to Silicon

    36 min9 levels

  4. 04

    HTTP/3 and QUIC, from request to datagram

    How HTTP moved off TCP: head-of-line blocking, QUIC streams and packets, a TLS 1.3 handshake folded into the transport, and the UDP datagrams carrying it all.

    Idea to Machine

    45 min10 levels

  5. 05

    HTTP caching, down to the disk

    Open a news article twice. Follow its HTML, JavaScript, logo and comments through freshness checks, validators, service workers and the back/forward cache to see which requests ever reach a server.

    Idea to System

    38 min9 levels

  6. 06

    CORS, at the browser’s boundary

    Your app can reach the API. Why can’t it read the reply? Follow one JSON order through origins, preflights, cookies and the browser’s response filter, down to HTTP/2 frames.

    Idea to Machine

    38 min8 levels

  7. 07

    WebSockets, down to the frame

    Why the web needed a full-duplex pipe, how an HTTP request turns into one, and what every bit of a WebSocket frame means on top of a TCP stream.

    Idea to Machine

    40 min8 levels

  8. 08

    WebRTC, from Join call to the wire

    Ana is behind her home router. Ben is behind a carrier NAT. Follow their video call through negotiation, hole punching, encryption and the packets that arrive just in time.

    Idea to Machine

    50 min10 levels

  9. 09

    Video streaming, down to the decoder

    Press play on a ten-minute talk. Follow the first picture, the next segment and a sudden tunnel through HLS, DASH, adaptive bitrate, browser buffers and the silicon that turns bytes into motion.

    Idea to Silicon

    38 min9 levels

  10. 10

    How a push reaches your lock screen

    Your chat tab is closed. Ana is running five minutes late. Follow one encrypted message through keys, queues, a sleeping phone and the bytes that wake it.

    Idea to Silicon

    43 min10 levels

  11. 11

    How HTML becomes pixels

    One product card, from arriving bytes to a glowing display. Build its DOM, resolve its CSS, and find out why moving a badge can cost a frame.

    Idea to Silicon

    42 min9 levels

  12. 12

    WebAssembly, top to bottom

    Start with real C zlib compressing your text in this tab. Then go down through the JavaScript boundary, the module format and the stack machine to the guard pages and x86-64 an engine uses to run it fast and safely.

    Idea to Machine

    40 min10 levels

Notes

Practical answers in web and networking.

  1. Note3 min read

    Find what makes a page interaction slow

    Use Event Timing to separate input delay, handler work and presentation delay, then correlate slow interactions with long animation frames and a DevTools trace.

  2. Note4 min read

    Set up passkeys: the minimum server checks

    Generate fresh challenges, bind them to the ceremony, and verify origin, RP ID, flags and signatures before creating a session or storing a credential.

  3. Note4 min read

    Send a Web Push notification from Node

    Generate a VAPID identity, save a browser subscription, and build an encrypted push request with Node crypto before sending it to the subscription endpoint.

  4. Note4 min read

    Cache-Control recipes that actually work

    Choose response directives by whether data is public, how long staleness is acceptable, and whether a stored response may be reused without validation.

  5. Note3 min read

    SSE vs WebSockets vs long polling

    Use SSE for server-to-page text updates, WebSockets for bidirectional streams, and long polling when ordinary request handling is the simplest fit.

  6. Note3 min read

    Check whether a site uses HTTP/3

    Check client support, inspect HTTP/3 advertisements, then confirm the actual connection protocol with curl or browser DevTools.

  7. Note3 min read

    Read a TLS handshake from the command line

    Use OpenSSL to check the certificate chain, hostname and negotiated parameters; use curl to see the HTTP request on the same connection.

  8. Note3 min read

    Debug DNS with dig

    Compare recursive and authoritative answers, inspect status and TTLs, and distinguish DNSSEC signals from local validation.

  9. Note3 min read

    Put card buttons beside links, not inside them

    Give navigation and actions separate HTML controls. A sibling link and button work with the mouse, keyboard and assistive technology without event-cancellation patches.

  10. Note3 min read

    CORS: a practical response-header checklist

    Diagnose a blocked browser fetch by checking the origin, preflight response and credential policy. CORS controls what scripts can read; it does not authenticate a request.