Chapter Eight · Part 2: The Network

The Web

You've followed a request from your computer, across the internet, through DNS to find the right address. This chapter is what happens at the other end: the short conversation between your browser and a server that turns that address into a page on your screen.

4 topics

Up to now, "opening example.com" has been about getting a message to the right place — through your home network, across the internet, and through DNS to find the address. This chapter picks up the thread where it lands: at the computer holding the website, and the exact back-and-forth that sends a page back to you.

Four topics build that picture. First, the conversation itself — your browser asks, a server answers. Then HTTP, the shared language they use to ask and answer. Then what a web page actually is once it arrives, since it's not one thing but three. And finally, why two sites on the same connection can feel worlds apart in speed — which pulls together distance, size, and server work from across Part 2.

How the web works, across this chapter
The conversation
Every page is one exchange — the browser asks and the server answers — using a shared language called HTTP.
What a page is made of
The page that comes back is three kinds of file: HTML for structure, CSS for style, JavaScript for behavior.
Fast or slow
How far away the server is, how heavy the page is, and how busy the server is all decide how long you wait.

Topics in This Chapter