This blog quotes from a article I think is very classic, here is the address of the article. English original
1. We enter the URL in the browser.
2. Browser lookup domain name corresponding to the IP address
The DNS lookup process is:
browser cache-> System cache-> Router cache->isp DNS cache-> recursive search
for recursive search process: From root domain server to top-level domain server to your queried domain name server.
3. The browser opens the TCP connection (the default port is 80), sends an HTTP request to the IP server, and if the browser stores a cookie under that domain name, the cookie is also placed in the HTTP request
4. The server makes a 301 permanent redirect response to the browser. The IP corresponding server is likely to be a proxy server, such as you enter "http://baidu.com", rather than "http://www.baidu.com", according to the rationale of these two URLs correspond to the same Web page, so through the way of proxy server redirection corresponding, Let these two Web sites visit the same Web page.
5. The browser makes the HTTP request again based on the redirected address.
6. The server analyzes the HTTP request, generates an HTTP response, and sends the response to the client.
7. After the browser receives the response content, the home page frame is generated, and the request continues to be sent to the server, with some resources on the homepage, such as pictures, videos, etc.
8. For static page content, browsers usually cache, for dynamic content is usually not cached, cache time also has a deadline.
9. The browser sends an asynchronous request to the server because the client still needs to keep in touch with the service end after some pages are displayed.
10. After the completion of the process, the browser closes the TCP connection.