The process of URL parsing is as follows:
- The user enters the URL address and the browser looks for the IP address based on the domain
- The browser sends an HTTP request to the server, and if the server segment returns a redirect such as 301, the browser sends the request again based on the location in the corresponding header
- Server-side accept requests, processing requests to generate HTML code, return to the browser, the HTML page code may be compressed
- The browser receives the server response results, if there is compression first decompression processing, followed by page parsing rendering
The process of parsing rendering is mainly divided into the following steps:
- Parsing HTML
- Building the DOM tree
- The DOM tree is attached to the CSS style to construct the rendering tree
- Layout
- Draw
An explanation of the HTML rendering process