What Really Happens When You Click a Link? A Step‑by‑Step Journey from URL to Rendered Page

This article walks through the entire browser request lifecycle—from entering a URL, resolving the IP via caches and DNS, establishing a secure HTTPS connection, to the server’s response and the browser’s parsing of HTML, CSS, and JavaScript into a rendered page.

Open Source Linux
Open Source Linux
Open Source Linux
What Really Happens When You Click a Link? A Step‑by‑Step Journey from URL to Rendered Page

Let's walk through the process step by step.

Step 1:

The user types a URL (e.g., www.linuxyz.cn) into the browser and presses Enter. The browser first tries to map the URL to an IP address using several cache layers—browser cache, operating‑system cache, local cache, and ISP cache. If the mapping is not found, the browser queries a DNS resolver.

Step 2:

If the IP address is absent from all caches, the browser performs a recursive DNS lookup with the DNS server until the address is resolved.

Step 3:

With the server’s IP address, the browser initiates an HTTPS request. It establishes a TCP connection via the three‑way handshake, then exchanges public keys so the client can encrypt a session key and send it to the server. The server decrypts the session key with its private key, and both sides use the session key to encrypt subsequent data.

Step 4:

The server processes the request and returns a response, typically with status code 200. The response contains HTML, CSS, and JavaScript. The browser parses the HTML to build the DOM tree, parses the CSS to build the CSSOM tree, merges them into a render tree, and finally paints the rendered content on the screen.

This complex chain of technologies works silently behind the scenes, enabling you to browse the web, watch videos, or shop online.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

html-parsingNetworkingBrowser RenderingHTTPSWeb Browsing
Open Source Linux
Written by

Open Source Linux

Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.