With the advent of the Internet age, there is almost always an interaction with our HTTP in real life. Just like the web sites we visit at ordinary times, such as baidu search, Taobao shopping, wechat video watching, wechat all use the Internet, but also use our HTTP.

We may be used to typing the domain name of the site we want to visit into the browser and seeing it go straight to the home page.

But have you really thought about what’s going on in this process?

Why is it that when we type in a url, we can go directly to the corresponding Web site?

What are the processing and actions behind this, to show us a beautiful dynamic page?

Domain name: for example, www.baidu.com/

For example, we often say the name: Xiao Li, nickname in order to facilitate our memory.

Browser parsing process

Step 1: Find the IP address of the target server. This process is resolved by a DNS server.

Step 2: Use the DNS server to query the IP address mapped to the domain name. The browser communicates with the Web server based on the QUERIED IP address. The communication protocol is HTTP.

How do we see the corresponding dynamic screen in the browser?

Is it a return from an HTTP request?

The server receives the request, executes it on the backend, and sends the result back to the browser as a message.

Return message information, how to display the corresponding image information?

Rendering: The rendering engine calls the various parts of our browser based on the mathematical model of our Html file description, thus presenting our source code as an image result.

Detailed steps:

Step 1: Parse the Html and load the parsing logic.

Step 2: Identify and load the style information.

Step 3: Calculate layer layout calculate relative position information

Step 4: Draw a layer to convert the page image into recognition pixels