# Who Reads Which Part? — narration script Runtime 2:42. Timecodes are when each chapter starts; the film's animation is keyed to these cue times, so a recorded voice-over should keep each line near its timecode. ## 0:00 · One address, many readers - `0:01` A URL looks like one thing. It's really a set of instructions, and each part is written for a different reader. - `0:10` Take https://www.democompany.com/image.html?size=large#caption. ## 0:26 · Who reads what - `0:26` The scheme is for the browser. https says: speak HTTP, and encrypt it. A mailto: scheme would hand the address to your mail program instead. - `0:39` The host is for DNS. www.democompany.com is looked up and becomes an IP address. The port is for the connection. Nobody wrote one here, so the browser fills in 443, the default for https. - `0:58` The path and the query are for the server. They travel inside the request, and the server decides what /image.html and size=large mean. To the browser they're just characters. - `1:14` Fun fact: the host also travels, in the Host header, so one server can answer for many sites at once. - `1:24` And the fragment? It never leaves your machine. The browser keeps #caption for itself, scrolls to the element with that id, and tells the page's scripts. The server never sees it. ## 1:39 · Before anyone reads - `1:40` Most links in a page are relative, like the image page's ./assets/media/cat.webp. Before any reader sees one, the browser resolves it against the page's own address, borrowing the scheme, the host and part of the path. ## 2:00 · Keeping the parts apart - `2:00` Each reader splits the URL at its own punctuation, so data must not look like punctuation. Percent-encoding writes a space as %20 and an ampersand as %26. In a form's query string, a plus sign means a space too. ## 2:20 · Try it - `2:20` So when a link breaks, ask which reader it broke for: the browser, DNS, the connection, the server, or the page itself. - `2:31` Paste any URL into URL Explorer and see every part, and who reads it.