Learn / Walkthrough

Loading a web page

When you open a website, your device first finds the server's address, then opens a connection, then asks for the page. This capture uses plain HTTP so you can read every request.

  1. Finding the server

    Packet 1

    Before anything else, the laptop asks its DNS resolver for the address of shop.example.

    Think about it: Which device answers DNS questions in this capture?

    192.168.1.1, the home router, which acts as the DNS resolver.

  2. The address comes back

    Packet 2

    The resolver replies with 203.0.113.40. Now the laptop knows where to send its request.

  3. Knocking on the door

    Packet 3

    The laptop sends a SYN to port 80, the standard port for HTTP. It's asking to open a TCP connection.

    Think about it: Why does the laptop need a TCP connection before asking for the page?

    TCP makes delivery reliable: it numbers the data, confirms what arrived, and resends anything lost.

  4. The server agrees

    Packet 4

    The server replies SYN, ACK: it accepts the connection and confirms the laptop's request.

  5. Connection open

    Packet 5

    The laptop's ACK completes the three-way handshake. Both sides can now send data.

  6. Asking for the page

    Packet 6

    The laptop sends GET / with a Host header naming shop.example. Because this is plain HTTP, anyone on the path can read it.

  7. The page arrives

    Packet 7

    The server answers 200 OK with a small HTML page. Open the inspector to see the headers and the HTML.

    Think about it: The page refers to /style.css. What do you expect the laptop to do next?

    Ask for it on the same connection. HTTP/1.1 reuses connections, so there's no new handshake.

  8. Fetching the stylesheet

    Packet 9

    The laptop reuses the open connection to request /style.css.

  9. Saying goodbye

    Packet 12

    When it's done, the laptop sends FIN to close its side. The server does the same.