What happens when you open a website?
From address to screen
Follow one simplified visit that needs the network. Open a step for the explanation and a deeper topic.
Open a step to connect it to the full explanations.
02Find an addressDNS can supply an IP address for the hostname.
A usable saved DNS answer may avoid a new lookup. DNS does not fetch the /guide page.
[2]
Every visit can take a different route. This is a simplified network path, not a mandatory timeline. Caches, a controlling service worker, or reused connections can skip network steps; resource requests and rendering can overlap.
Choose your depth
Stay with the essentials, or look closer.
YOUR GOALTell the story of a page load without mixing up finding, fetching, and displaying.
An address becomes a page.
Browser, search engine, or website?
A browser is the app you use to open and display web pages, such as Firefox or Chrome. A search engine, such as Google Search, is a service that helps you find pages. A website is a collection of linked pages; SmartTLDR is one.
The same address bar can do two jobs. Entering https://smarttldr.com/topics/dns/ asks the browser to open that page. Entering search words such as how DNS works and submitting a search sends a query to a search engine. If you choose a result, the browser opens its destination. You can open a known address without searching first.
Start with a destination
Imagine opening https://learn.example/guide. This is a fictional address: .example is reserved for explanations. The address tells the browser which resource you want; it does not contain the page itself.
A domain name gives people a readable name. DNS can help find a network address for that name when a lookup is needed.
[1] [2] [13]Ask, then assemble
For a visit that needs the network, the browser connects and asks for content. With HTTPS, the communication is protected in transit.
The first page response may contain HTML: a description of the page's structure. A photo, stylesheet, or script can require another request. The browser uses what arrives to build the page you see; it does not receive one finished picture of the website.
[3] [4]Returning can mean less work
Caching means saving something for possible reuse. On another visit, the browser may already have a usable image or stylesheet. Some sites also use a service worker, a background script that can answer requests with saved content.
Think of the illustrated journey as an explanation of the jobs involved. It is not a promise that every visit performs each job from scratch.
[10] [11]Finding the destination, fetching resources, and drawing the page are different jobs.
One response always contains everything needed for the whole page.
HTML can refer to separate resources. The browser may request those too, while saved resources can be reused.
Show the explanation
The browser makes another request for the photo. HTML can reference a separate image resource. Fetching that image is a content request, not a DNS answer.
YOUR GOALConnect URL parts, network protocols, HTTP messages, and rendering to their specific roles.
Follow the jobs behind one visit.
1. Read the address and locate the host
In our fictional URL, https selects secure HTTP, learn.example is the hostname, and /guide is the resource path. A path need not name a physical file.
DNS address queries concern the hostname, not the complete URL. Their answers can provide IP addresses used to reach a network destination. They do not decide which HTML belongs at /guide.
2. Establish or reuse a secure connection
For HTTPS using HTTP/1.1 or HTTP/2, a new connection normally establishes TCP, then performs a TLS handshake to establish secure communication.
HTTP/3 takes a different route: it runs over QUIC, which uses UDP and integrates TLS into connection setup. It does not add a TCP handshake. In either case, a usable connection may already exist.
[3] [4] [5] [6] [17]3. Request a resource
An HTTP GET request can ask for /guide. The response has a status code and headers, and may have a body such as HTML. A successful response is different from a redirect or an error.
The browser may include cookies, such as a saved session identifier. It does not send every cookie it holds: domain, path, security attributes, expiry, and browser policies affect eligibility.
[6] [7]4. A CDN may answer before the origin does
If the site uses a content delivery network, a CDN server may supply a reusable cached response. Otherwise it may fetch from the origin, the server behind the CDN that supplies the site's content.
Different resources can take different routes. An image might be cached while a personalized page needs an origin response. A CDN does not automatically cache every response.
[8] [10]5. Build what the reader sees
The browser parses HTML into a document structure called the DOM and processes CSS styling. Layout determines sizes and positions; paint produces the visual content. JavaScript can update that structure and trigger further display work.
This rendering process can begin while other resources are still arriving. Loading and displaying are related work, not one indivisible event.
[3] [12]The hostname helps locate a destination; HTTP selects resources; the browser renders their contents.
HTTPS always means TCP followed by TLS, with a new connection for every page.
HTTP/3 uses QUIC with TLS integrated into setup, and browsers can reuse eligible existing connections.
Show the explanation
learn.example. The hostname is learn.example. The scheme chooses the protocol and /guide identifies a resource for the web request; DNS does not retrieve that page.
YOUR GOALExplain why cold and warm visits differ without assuming that caches or connections work as one unit.
A page load is a set of dependencies.
Cold and warm are shorthand, not switches
A cold visit has little useful saved state; a warm one can reuse more. But DNS answers, transport connections, and HTTP responses have separate reuse conditions. Having a saved DNS answer does not mean the HTML is cached.
In a hypothetical return visit, the browser could reuse an address and connection, fetch updated HTML, and reuse a fresh stylesheet. Those observations fit together. A repeat visit is not a guarantee of zero network traffic or a particular load time.
[2] [5] [6] [10]Revalidation still uses the network
When a stored response needs validation, the browser can send a conditional request, such as If-None-Match with its saved ETag. A 304 Not Modified response allows reuse of the stored body rather than sending that body again.
Distinguish reuse without a network request from reuse after validation. Both save work, but only the first avoids that validation exchange.
[14]A service worker can change the route
An active service worker controlling a navigation can intercept the request and provide a response, including one from its managed cache. This is programmable behavior, separate from ordinary HTTP-cache rules.
It applies only where a service worker is installed, active, and controlling the relevant request. Do not insert this step into every site visit, or assume that a displayed page proves a new origin request happened.
[11]Follow dependencies, not a single line
Consider a hypothetical page whose HTML references a stylesheet and a script. The stylesheet may reveal a font to fetch; the script may later request data. Some requests can overlap, while a resource discovered through another resource cannot be fetched through that discovery before it becomes known.
That is why a request waterfall can show branches and gaps. It does not imply that every resource downloads in order. A blocking script can pause HTML parsing, whereas deferred or asynchronous scripts have different scheduling rules.
[6] [9]Downloaded is not the same as displayed
JavaScript can change the DOM or styles after the initial display. The browser may then need updated style calculations, layout, or paint, depending on the change. Not every update forces every stage for the entire page.
When investigating a slow visit, separate waiting for resources from work to display them. A completed download alone does not establish that the visible page is ready.
[9] [12]Ask what was reused, what depended on earlier work, and what the browser still had to render.
A 304 response means the browser made no network request.
A 304 answers a conditional request. It saves sending the stored response body again, but the validation exchange still happened.
Show the explanation
The validation happened, and the browser can reuse its stored stylesheet body. 304 confirms reuse after a conditional request; it does not carry a replacement representation body. This differs from satisfying the request locally without validation.
Keep asking. Check the details.
Source-checked using AI (OpenAI Codex) on . The checks covered sources, examples, and quizzes for this article version.
No human review is claimed. AI review can miss errors; check the original sources below.
- MDN — What is a URL?
- RFC 1034 — DNS concepts and facilities
- MDN — Populating the page: how browsers work
- RFC 8446 — TLS 1.3
- RFC 9114 — HTTP/3
- MDN — Overview of HTTP
- MDN — Using HTTP cookies
- Cloudflare — What is a CDN?
- Chrome for Developers — Inside look at modern web browser, part 3
- MDN — HTTP caching
- MDN — Service Worker API
- web.dev — Render-tree construction, layout, and paint
- RFC 2606 — Reserved top-level DNS names
- RFC 9111 — HTTP caching and validation
- MDN — Browsing the web: browsers, websites, and search engines
- Google Chrome Help — Search from the address bar
- RFC 9000 — QUIC uses UDP datagrams and integrates TLS