Enter URL to return the entire process of the page

Source: Internet
Author: User
Tags domain name server browser cache

After a more comprehensive study of the computer network, we can talk about life often encountered a more classic problem, is to describe the input URL from the page to return the entire process.

1. We enter a domain name: www.baidu.com, then click Confirm;

2. The browser finds the IP address of the domain name. The lookup process is as follows:

First is the browser cache, the browser will cache DNS records for a period of time;

If the required records are not found in the browser cache, the browser makes a system call to get the records in the system cache;

Then is the router cache, the router generally will have its own cache;

If the former is not found, you need to start the DNS query from the local domain name server. Detailed DNS query procedures I talked about in how DNS works .

3. Now that the browser has found the IP address of the domain name, you need to establish a TCP connection to the Web server and then send the HTTP request. The TCP connection process I spoke about in TCP , the specific request process I spoke about in HTTP .

Well, let's combine DNS, TCP, and HTTP to say the whole process of entering a URL into a page return.

1. We enter a domain name:www.baidu.com

2. browser to find the browser cache, if there is a domain name of the IP address is returned, if not continue to find;

3. System Lookup System cache, if there is a domain name of the IP address is returned, if not continue to find;

4. The router looks for the router cache, if there is a domain name of the IP address is returned, if not continue to find;

5. The local domain name server uses the iterative query, it first queries to a root domain name server;

6. The ROOT name server tells The local domain name server, the next time should query the top-level name server dns.com IP address;

7. The local domain name server dns.com The top-level domain name server;

8. Top-level domain name server dns.com tells The local name server, the next time should be queried the right name server dns.baidu.com IP address;

9. The local domain name server dns.baidu.com to the right domain name server;

10. The domain name server dns.baidu.com tells The local name server, the queried host www.baidu.com IP address;

11. The local domain name server finally tells the host the query result;

12. After the host browser obtains the IP address of the Web server, establish a TCP connection with the server;

13. The client where the browser is located sends a connection request message to the server;

14. After receiving the message, the server agrees to establish a connection to send a confirmation message to the client;

15. After receiving the acknowledgement message, the client sends a message to the server to confirm that the acknowledgement message has been received;

16. The TCP connection between client and server is established, and communication is started;

17. The browser sends out the file command: GET;

18. The server gives a response, sends the specified file to the browser;

19. The browser releases the TCP connection;

20. The host of the browser sends a connection release message to the server and then stops sending the data;

21. The server receives the release message and sends out a confirmation message, then sends out the data that is not transmitted on the server;

22. After the server data transfer is complete, send the connection release message to the client;

23. After receiving the message, the client sends out a confirmation and then waits for a period of time to release the TCP connection;

24. The browser displays all the text on the page.

These are all the detailed procedures from the input URL to the page return.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Enter URL to return the entire process of the page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.