Kayavak / The Web Frontend / FE·00 Start Here: How the Web Works / Deeper
Deeper · The Web Frontend
Start Here: How the Web Works
The questions the chapter doesn't stop for: why this exists, the model to keep in your head, what changes when an assumption does, how sure we are of each claim, and what's still open. Read it after the chapter; back to the chapter.
Why does this exist?
In March 1989 Tim Berners-Lee, at CERN, proposed a way to share documents between physicists using different computers: link documents across machines by address. By the end of 1990 he had the three pieces this chapter introduces: a way to name a document anywhere (the URL), a protocol to fetch it (HTTP), and a format for writing it with links (HTML), plus the first browser and server. The web went public in 1991. NCSA Mosaic (1993) showed images inside pages and made it popular; Netscape (1994) made it a business. CERN put the web's technology in the public domain in April 1993, which is a large part of why it spread.
The web won over other systems of the time, such as Gopher, partly because it asked so little: any server could link to any other without permission, and a broken link was allowed. That openness is still its shape: anyone can publish, anyone can link, and browsers must cope with anything.
The mental model
Try it yourself first: write your own model in the Mental Model Explorer, then compare.
The web is documents and programs fetched by address. A browser asks a server for a URL, gets back text, and turns it into something you can see and use; everything else is detail on one of those steps.
| Question | Answer |
|---|---|
| What is it? | Clients (browsers) requesting resources by URL from servers over HTTP |
| Problem it solves | Publishing and linking information across any computers, without central control |
| Parts | URL (where), HTTP (how to ask), HTML (structure), CSS (look), JavaScript (behaviour), the browser that combines them |
| How it works | Parse the URL, find the server (DNS), connect, request, receive, build the DOM, style, lay out, paint, run scripts |
| Assumptions | Servers answer; links may break; pages work across very different devices and browsers |
| When they change | Offline, slow networks or old devices: the web's later chapters (performance, PWAs) handle these |
| Where it fails | Everything from another origin is untrusted, so security rules (origins, CORS, CSP) shape what pages may do |
| Related ideas | DNS, TCP and TLS (Foundations, ch09); the browser's internals (ch18) |
What if?
What if the web had required permission to link?
Reason it through, then open
Every link would need an agreement, so the web would have grown like a set of walled catalogues rather than one network. Search engines, which crawl by following links, would barely work. Broken links are the price of the opposite choice: anyone can link to anything, and nothing guarantees the target still exists.
What if browsers rejected any page with an error in its HTML?
Reason it through, then open
Most of the early web would have shown nothing, because hand-written HTML was full of mistakes. XHTML tried this strictness in the 2000s (one error, no page) and authors avoided it. HTML5's answer was the opposite: specify exactly how every browser must recover from every error, so broken markup at least breaks the same way everywhere.
Where the boundary is
| Aspect | The internet | The web |
|---|---|---|
| What it is | The network of networks carrying packets (IP) | One application on it: linked documents over HTTP |
| Since | ARPANET 1969; TCP/IP 1983 | Proposed 1989; public 1991 |
| Other uses | Email, video calls, games, file transfer, SSH | None: it is one use |
| Confused because | Most people reach the internet through a browser |
How sure are we?
| Claim | How it's known | Where from |
|---|---|---|
| Berners-Lee proposed the web at CERN in 1989 | Historical | His proposal, Information Management: A Proposal |
| The fragment (#…) is never sent to the server | Convention | The URL and HTTP specifications; browsers keep it local |
| A page is built from HTML, CSS and JavaScript | Simplification | Also images, fonts, WebAssembly, media and more |
Still open
How the web should be governed and who controls it are live questions: a few browser engines (Chromium, WebKit, Gecko) decide what the platform supports, and much traffic flows through a few large platforms. Projects to make publishing independent again (personal sites, open protocols for social media) are active.
What would change your mind? If closed app platforms delivered the same reach without gatekeepers, the open web's main advantage would shrink. So far, app stores keep the opposite trade-off.
Recall
What three pieces made the original web?
URLs to name documents, HTTP to fetch them, HTML to write them with links.
Why did the web allow broken links?
Linking needed no permission from the target, which let it grow without central control; broken links are the cost.
What's the difference between the internet and the web?
The internet is the network carrying packets; the web is one application on it.
How does HTML5 handle broken markup?
It specifies exactly how browsers must recover from every error, so they all behave the same.
Reflect
Be honest with yourself; this stays in your browser. Anything you can't tick yet is what to revisit.