Copy the code

1. The browser will start a thread to process the request and analyze the URL to determine if it is HTTP and process it in Web mode.

2. Call the corresponding method in the browser kernel, such as loadUrl method in WebView;

3. Obtain the IP address of the URL through DNS resolution, set the UA and other information to send the second GET request;

4, HTTP protocol session, the client sends a header (request header); 5. Access the Web Server on the Web Server, such as Apache, Tomcat, and Node.js.

6. Enter the deployed back-end application, such as PHP, Java, JavaScript, Python, etc., to find the corresponding request processing;

7. The feedback header at the end of processing. If the browser has visited and there is a corresponding resource in the cache, it will be compared with the last modification time of the server.

8. The browser starts downloading the HTML document (response header, status code 200), using the cache;

9, document tree establishment, according to the mark request required to specify the MIME type of the file (such as CSS, JS), and set the cookie;

10. The page starts rendering DOM, JS manipulates DOM according to DOM API, performs event binding, etc., and the page display is complete.

The original