aryans.codes / a field guide

What actually happens when you press enter.

You typed a few letters and a page showed up in under a second. In between, your computer talked to half a dozen machines across the planet. Here's the whole trip, one step at a time.

🔒
~1 ms

Parse the URL

The browser splits what you typed into parts. The scheme says which protocol to use, the host says which machine, and the path says which thing on that machine.


  
~0-50 ms

DNS: turn a name into a number

Computers don't route by names, they route by IP addresses. So the browser asks: what's the address for aryans.codes? It checks its own cache, then the OS cache, then asks a recursive resolver (usually your ISP, or 1.1.1.1 / 8.8.8.8).

If the resolver doesn't know, it walks the tree: root servers point to the .codes servers, which point to the domain's own nameservers, which finally give the answer.

.  (root)
 └─ codes.          "ask these TLD servers"
     └─ aryans.codes.  "ask these nameservers"
         └─ A record → 185.199.108.153
Subdomains like assets.aryans.codes are just more records in the same zone. Often they're a CNAME, which is a pointer to another name.
~1 round trip

TCP: open a reliable line

With an IP in hand, the browser opens a TCP connection on port 443. This is the famous three-way handshake. It makes sure both sides are listening and agree on sequence numbers, so lost packets can be resent and arrive in order.

you    ──SYN──────▶  server
you    ◀──SYN-ACK──  server
you    ──ACK──────▶  server   connected
Newer HTTP/3 skips TCP and uses QUIC over UDP, merging this step with the next one to save a round trip.
~1 round trip

TLS: agree on a secret

That padlock means everything from here on is encrypted. In TLS 1.3 the browser sends supported ciphers and a key share. The server answers with its own key share and a certificate proving it really owns the domain, signed by an authority your browser already trusts.

Both sides combine the key shares into the same secret without ever sending it. Anyone sniffing the wifi just sees noise.

ClientHello  + key share   ─▶
             ◀─  ServerHello + key share + certificate
both derive the same session key   🔒
~1 round trip + server time

HTTP: actually ask for the page

Finally, the real request. It's surprisingly plain text (well, binary-framed in HTTP/2, but same idea).


    
HTTP/2 200
content-type: text/html; charset=utf-8
cache-control: max-age=600
content-length: 9241

<!doctype html><html>...
200 means OK. You've also met 404 (not found), 301 (moved), and 500 (the server broke). The first digit tells you the category.
~10-20 ms

Parse: HTML to DOM, CSS to CSSOM

The browser reads the HTML top to bottom and builds a tree of elements called the DOM. When it hits a stylesheet, script, image, or font, it fires off more requests, often to an assets subdomain or a CDN, which repeats steps 2-5 for that host.

html
 ├─ head
 │   ├─ title
 │   └─ link rel=stylesheet  → fetch!
 └─ body
     ├─ h1
     └─ img src=assets.aryans.codes/…  → fetch!
~16 ms per frame

Layout, paint, composite

DOM + CSS rules become a render tree. The browser calculates where every box goes (layout), fills in pixels (paint), and stacks layers together on the GPU (composite). At 60 frames per second it has about 16 ms to do this whenever something changes.

This is why animating transform and opacity is smooth, while animating width can stutter. The first two skip layout and paint.
Rough total, first visit0 msSecond visit is faster: DNS, TLS session, and assets are all cached.
check yourself