Address bar Enter a URL what happens after you press ENTER?
1. We enter the URL in the browser
2. Browser to DNS find the IP address of the domain name
3. The browser opens a TCP connection (the default port is 80), sends an HTTP request to the IP server, and if the browser stores the 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.
5. The browser makes HTTP requests again based on the redirect address.
6. The server parses the HTTP request, generates an HTTP response, and sends the response to the client.
7. After the browser receives the response content, it generates the home page framework and continues to send requests to the server, which is the resources on the homepage, such as pictures, videos, etc.
8. For static page content, the browser usually caches, for dynamic content is usually not cached, the cache time is also limited.
9. The browser sends an asynchronous request to the server because some pages show that the client still needs to keep in touch with the service after the page is finished.
10. After the entire process is finished, the browser closes the TCP connection.
The DNS lookup process is: Browser cache, system cache, router cache->isp DNS cache, recursive search recursive search process: From the root domain name server to the top-level domain name server to the domain name server you queried.
Address bar Enter a URL what happens after you press ENTER