返回资讯中心
外部精选
软件工程
#开发者实时流

Show HN: Ask a technical question, get an animated explainer you can interrupt

Explore the full explanation, examples, and visuals at your own pace.

Hacker News 最新shadaba2026/10/14 · 2026/10/149 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

Explore the full explanation, examples, and visuals at your own pace.

This google.com visit uses DNS, establishes a secure connection, sends an HTTP request, then renders the response.

Ask about this

DNS finds where to connect

The browser knows google.com as a name, not the network address it needs to contact. It asks a resolver, which looks up that name through DNS; the IP address comes back to the resolver, then to the browser. Here, we’re assuming there’s no usable cached answer, though caching can shorten this path.

Ask about this

TCP opens a connection

The IP address identifies the endpoint the browser will contact. The browser sends SYN, the edge replies with SYN ACK, and the browser finishes with ACK. This three-way handshake establishes TCP state and confirms both sides can communicate. TCP can then provide ordered, reliable delivery, but it doesn’t authenticate google.com or encrypt traffic. TLS handles that.

Ask about this

TLS secures that connection

On the existing TCP connection, the browser starts TLS with a client hello. The Edge returns a certificate, which the browser validates for google.com. They complete the handshake and establish encryption keys. Only then can HTTP messages travel as protected traffic, so TCP reliability and TLS security are separate layers.

Ask about this

The browser asks for a resource

The browser sends an HTTP request to the edge over the established TLS connection. GET is the method, asking for a resource; the slash means the root path. The request identifies google.com and includes headers, all protected in transit by TLS.

Ask about this

The edge checks for cached content

The Edge checks whether it has a usable cached copy of the requested page. If the content is eligible and cached, it can respond without contacting the Origin. In our assumed cache miss, the Edge forwards the request to the Origin, where the work continues.

Ask about this

If the edge has no usable cached response, where does it send the request?

Let's think this through. If the edge has no usable cached response, where does it send the request? A: Back to the DNS resolver. B: On to the origin server. C: Straight to the browser renderer. Choose an answer, or just think it through. I'll explain in a moment.

Ask about this

If the edge has no usable cached response, where does it send the request?

The answer is B: On to the origin server. The edge forwards this cache miss to the origin, which can produce a response. DNS already helped locate an endpoint; it does not create the page. The browser renderer works after response data arrives.

Ask about this

A cache miss reaches the origin

With the assumed cache miss, the edge forwards the browser’s GET request to the origin. The origin handles it and returns an HTTP response to the edge, which passes it back to the browser. The response depends on the request and origin logic; it may not be suitable for caching.

Ask about this

What comes back?

An HTTP response has three parts. The status tells you whether the request succeeded, failed, or should redirect. Headers carry metadata like caching instructions, and the body contains page data when supplied.

Ask about this

Response data becomes a page

The browser parses returned HTML into the DOM, applies styles, then paints the pixels you see. That response may also point to stylesheets, scripts, or images, which can trigger additional requests before the page is fully rendered.

Ask about this

The visible page is the end of a longer exchange

A URL visit is a chain of lookups, handshakes, and exchanges. The pixels on screen come after DNS finds an address, a secure connection is established, and HTTP requests and responses carry the page—and often additional resources—to the browser.

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →