Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

From Click to Screen: The Journey of a Request

When you click on a link or press “Enter” on a web address, a lot happens in the background before the page appears on your screen. It’s like sending a super-fast letter and getting a giant Lego set in return!

Step 1: Finding the Address (DNS Lookup)

Remember in the previous chapter how we learned about the internet’s “phonebook”? Before your browser can go anywhere, it needs to find the IP address for the website you typed in.

It asks a DNS Server for the address. As we saw before, this is like looking up a friend’s name in a contact list to find their phone number. Once your computer has that number (the IP address), it’s ready to start the journey!

Step 2: Sending the Request (HTTP)

Now that your browser has the address, it sends a request. This request uses a set of rules called HTTP (HyperText Transfer Protocol).

This request is like a formal letter that says: “Hello! May I please have the files for your homepage? Here is my IP address so you know where to send them.”

Step 3: The Long Journey

This request travels out of your computer, through your router, to your Internet Service Provider (ISP), and across the globe through a network of routers and cables.

It’s like a relay race! Your request “hops” from one router to another. It might travel through fiber-optic cables buried underground or even giant cables at the bottom of the ocean!

Step 4: The Server Responds

Once the server receives your request, it looks up the page you asked for. But a website is usually too big to send all at once. It would be like trying to mail a whole house!

Instead, the server breaks the website into hundreds of tiny packets. Each packet is like a small envelope containing a piece of the puzzle.

Step 5: Building the Page

Your computer receives these packets. Sometimes they arrive out of order, but that’s okay! Your computer is smart and puts them back in the right order.

Once it has all the pieces, your browser reads the code (HTML, CSS, and JavaScript) and “renders” the page. It’s like following instructions to build a complex Lego set. In less than a second, the website appears on your screen!


Did you know?

  • Speed of Light: The signals carrying your request travel through fiber-optic cables at almost the speed of light!
  • Packet Path: Every packet might take a different path to get to your computer. One might go through London, while another goes through New York, but they all meet up at your house!
  • The First Click: The very first web page was created in 1991. Back then, it was just text and links—no pictures or videos!

Check Your Knowledge

  1. In Step 1, what does your computer need to find before it can start its journey, and where does it look?
  2. What are the “rules” called that browsers use to ask for a web page?
  3. Why does a server break a website into “packets” instead of sending it all at once?
  4. What happens if packets arrive at your computer in the wrong order?
  5. What are the three main types of code your browser uses to build the page you see?