The browser enters the URL address and accesses the home page

Analysis & Answers

  1. The browser resolves the domain name;
  2. TCP establishes connection;
  3. The browser sends an HTTP request to the server;
  4. The server parses the request and returns an HTTP message;
  5. The browser parses and renders the page;
  6. Disconnect.

Reflect & Expand

Domain name resolution process

  1. Look for browser cache – When we browse websites on a daily basis, the browser caches DNS records for a period of time. If we have visited this website before, there will be a corresponding cache record in the browser. Therefore, after we enter the URL, the browser will first check whether there is IP information corresponding to the domain name in the cache. If there is, the information will be returned directly for the user to access the website. If the query fails, it will be searched from the system cache.
  2. Search the system cache - Check whether there is stored DNS information in the hosts file (on the MAC side, you can enter the command cat etc/hosts in the "Terminal" to find the location of the hosts file). If the query fails, you can continue to search from the router cache.
  3. Look up the router cache - Usually routers also cache information if the corresponding website has been visited before. If the query fails, the lookup can continue from the ISP DNS cache.
  4. Find the ISP DNS cache - look up from the DNS cache information of the network service provider (such as China Telecom).
  5. If the corresponding IP is not found through the above methods, the root domain name server is searched for the IP address corresponding to the domain name. The root domain name server forwards the request to the next level and searches for the corresponding data of the domain name layer by layer until the final resolution result is obtained or fails. The corresponding root domain name server, the root server is mainly used to manage the home directory of the Internet. It is the highest level domain name server in the Internet Domain Name Resolution System (DNS).

Meow Interview Assistant: A one-stop solution to interview questions. You can search the WeChat applet [Meow Interview Assistant]  or follow [Meow Interview Assistant] -> Interview Assistant to  answer questions for free. If you have any good interview knowledge or skills, I look forward to sharing them with you!

Guess you like

Origin blog.csdn.net/jjclove/article/details/127394196