Blog / How the internet works /
What happens in the first second of loading a page
You tap a link. Nothing happens. One second later, a page appears and you move on without a thought.
That one second is busy. Your phone has to find a server, shake hands with it, ask for a page, wait for an answer and then draw the result on a screen. Each step can go slowly, and each step has a different fix.
If you run a website, knowing the order matters more than knowing the jargon. “My site is slow” is not a diagnosis. “The server takes ages to answer” is. So here is the sequence, in plain words, with the part each step plays.
Step 1: finding the address (DNS)
Browsers can’t use names like ekom.blog. Computers talk to each other with numeric addresses. So the first job is a lookup: what address belongs to this name?
Think of a phone contact list. You tap “Mum”, and the phone dials a number you never see. DNS is that contact list for the internet. Your browser asks a resolver (usually run by your internet provider, or a public one), and the resolver finds the answer or remembers it from last time.
When the answer is already stored nearby, this step is nearly instant. When it isn’t, the resolver has to ask a chain of servers, and that costs time. If you’ve read how DNS works from typing to loading, this is the same story at speed.
What you control: which DNS provider hosts your records, and the TTL values on them. A good DNS host answers quickly from many places.
Step 2: opening a connection (TCP)
Now the browser knows where the server lives. Before any page content moves, the two sides agree to talk. It’s a quick exchange: “Are you there?” “Yes, are you?” “Yes, go ahead.”
This costs one round trip, which is the time a message takes to reach the server and come back. If the server is in the same city, a round trip is tiny. If it’s on another continent, it’s noticeably longer. That distance is the reason hosting near your readers is worth thinking about, and the reason a CDN exists.
What you control: where the server is, or whether a CDN puts a copy of your content closer to the visitor.
Step 3: making it private (TLS)
Almost every site now uses HTTPS. That means a second handshake, where the browser and server agree on how to encrypt the conversation and the server proves its identity with a certificate.
This adds a little more waiting, though modern versions of the protocol trimmed it down. It’s also the step where things visibly break: an expired certificate stops the page with a warning before anything loads. I covered the fix list in SSL certificates and HTTPS issues.
What you control: keeping the certificate valid and renewing automatically, and using a current protocol version.
Step 4: asking for the page (the request)
Finally, the browser sends a request. In its simplest form: “Please give me the page at this path.” It includes some extra information, such as the browser type, preferred languages and any cookies for this site.
That’s all a request is: a short note asking for a path.
Step 5: the server thinks (the wait)
This is the step that often hurts most on a typical WordPress site. The server receives the request and has to produce a page. On a static site, it just hands over a file. On WordPress, the server runs PHP, asks the database for the post, the menu, the widgets and the settings, assembles all of it and only then replies.
The time between the request leaving and the first byte of the reply arriving is called time to first byte, or TTFB. A slow host, a heavy theme, too many plugins or no caching all push it up. I wrote about what counts as slow in server response time (TTFB).
What you control: a lot. Page caching means the server skips most of the thinking and serves a ready-made copy. Good hosting gives it enough CPU and memory to think quickly. Fewer plugins means less work per request.
Step 6: the reply arrives
The server sends back the HTML, which is the skeleton of the page: text, headings, links and instructions about what else is needed. That HTML is usually compressed on the way, which shrinks it a lot.
Big replies take longer to travel, especially on a slow mobile connection. In many parts of the world, a heavy page is a cost the reader pays in data as well as time.
Step 7: reading and fetching more
The browser starts reading the HTML from the top. Every time it meets a stylesheet, script, font or image, it has to go and fetch it. Each of those might need its own connection and its own wait, though browsers do many in parallel and HTTP/2 and HTTP/3 help a lot. HTTP/2, HTTP/3 and CDNs explains why.
Some files block the page from showing. A large stylesheet in the head, or a script that has to run first, can hold the screen blank. That’s why advice like “defer non-critical scripts” exists.
What you control: how many files, how big they are, and whether they block rendering. Third-party scripts such as chat widgets and pixels are the usual offenders; third-party scripts and speed covers them.
Step 8: drawing the page
With the HTML and the styles, the browser works out the layout and paints pixels. The first visible content appears (this is roughly what First Contentful Paint measures). The biggest image or text block settles in (Largest Contentful Paint). Anything that jumps around as late files arrive causes layout shift.
So “the first second” ends with something you can see. Whether it takes 0.8 seconds or 4 depends on every step above.
Where the time usually goes
You don’t need exact numbers to reason about this. In rough terms:
| Stage | Typically slow when |
|---|---|
| DNS | Slow DNS host, very low TTL, no caching |
| Connection and TLS | Server far from the reader, old protocol versions |
| Server wait (TTFB) | No caching, weak hosting, heavy plugins, slow database |
| Download | Large HTML, no compression |
| Rendering | Big images, blocking scripts, many third-party tags |
Most small sites lose their time in two places: the server wait and the render. Both are fixable without being a developer.
Myths worth dropping
- “Speed is all about images.” Images matter, but a slow server makes every page slow, however small the pictures.
- “A CDN fixes everything.” A CDN helps with distance and static files. It won’t rescue a page that takes three seconds to build.
- “A speed score is the goal.” Scores are a summary. The goal is a page people can use quickly on the phones and connections they really have.
Key takeaways
- A page load is a sequence: DNS, connection, encryption, request, server work, download, render.
- Each step has its own cause of slowness and its own fix.
- On most small sites, server response time and heavy front-end files do the damage.
- Measure the step before you change anything. Guessing wastes time.
FAQ
Why does the first visit feel slower than the second?
Because the first visit has nothing stored. The browser may have to look up DNS, set up a new connection and download every file. Later visits can reuse cached files and open connections.
Can I see these steps for my own site?
Yes. Your browser’s developer tools have a Network tab that shows each request and its timing, including waiting and download time. Open it, reload the page and look for the longest bar.
Which step should I fix first?
The slowest one. If the server wait is the biggest chunk, work on caching and hosting. If the page is waiting on files, trim what it loads.
Related reading
- What actually happens when you type a web address
- HTML, CSS and JavaScript: the three layers of the web
- What a server is, and what it is not
Open your homepage with the Network tab running and find the single longest bar. Which step does it belong to?