What happened in the process of receiving from the input URL to the browser?

Source: Internet
Author: User
Tags browser cache

What happened in the process of receiving from the input URL to the browser?

What really happens if you navigate to a URL

Both of the above articles are well understood and worth reading.

The next step is to summarize this process:

1, first, will query the cache, if the cache exists, then respond directly, otherwise continue the following process;

2. When sending a URL request, whether the URL is a Web page URL or a URL for each resource on a Web page, the browser will open a thread to process the request and start a DNS query on the remote DNS server. This enables the browser to obtain the corresponding IP address of the request. The DNS lookup process is as follows: Browser cache, system cache, router cache, ISP DNS cache, recursive search

3, the browser and the remote ' Web ' Server through the ' TCP ' three handshake negotiation to establish a ' TCP/IP ' connection. The handshake consists of a synchronization message, a synchronous-response message, and a response message, which is passed between the browser and the server in three messages. The handshake is first attempted by the client to establish communication, then the server answers and accepts the client's request, and finally the client sends a message that the request has been accepted.

4. Once the ' TCP/IP ' connection is established, the browser sends a ' GET ' request for ' HTTP ' to the remote server through the connection. The remote server locates the resource and returns the resource using an HTTP response, and the HTTP response status of 200 indicates a correct response.

5. At this point, the ' Web ' server provides resource services and the client begins to download resources. Cached if the resource is cacheable.

6. After the response is returned, it enters the front-end module that we care about, and the browser decides how to handle these responses (for example, it is an HTML page, a picture, a piece of music). simply put, the browser parses ' HTML ' to generate ' DOM tree ', followed by css Rule Tree , and ' JavaScript ' can operate ' Dom ' based on ' Dom API '

What happened in the process of receiving from the input URL to the browser?

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.