What happened during the process from URL input to page loading?

Source: Internet
Author: User
1.browser checks cache; if requested object is in cache and is fresh, skip to #92.browser asks OS for server‘s IP address3.OS makes a DNS lookup and replies the IP address to the browser4.browser opens a TCP connection to server (this step is much more complex with HTTPS)5.browser sends the HTTP request through TCP connection6.browser receives HTTP response and may close the TCP connection, or reuse it for another request7.browser checks if the response is a redirect (3xx result status codes), authorization request (401),error (4xx and 5xx), etc.; these are handled differently from normal responses (2xx)8.if cacheable, response is stored in cache9.browser decodes response (e.g. if it‘s gzipped)10.browser determines what to do with response (e.g. is it a HTML page, is it an image, is it a sound clip?)11.browser renders response, or offers a download dialog for unrecognized types


1. check the browser cache. If the requested object is cached, go to step 2. the browser will ask the ip3. Operating System of the server you requested to query the local host file first. If there is no ing of this domain name in hosts, the browser will look for the local DNS parser cache; if there is still no, the preferred DNS server set in TCP/IP parameters is used to query files and caches in the local region. If the file and cache resolution in the local region of the local DNS server are invalid, queries are performed based on the settings of the local DNS server (whether to set the forwarder). If the forwarding mode is not used, the local DNS sends the request to 13 root DNS servers. If the forwarding mode is enabled, this DNS server will forward the request to the upper-level DNS server for resolution. If the upper-level server cannot resolve the request, or find the root DNS or transfer the request to the upper-level server, this cycle will take place. Finally, return the IP address to the browser. 4. after obtaining the IP address, the browser wants to establish a socket connection to the server (regardless of HTTPS. 6. the browser sends an HTTP request to the server over TCP. when the browser receives the server response, it will disconnect the TCP connection or reuse it for other requests. 7. the browser checks the response status as redirection (3xx), requires authorization (401), and server errors (4xx and 5xx). If the request is normal, 2XX (200) and 8 are returned. if the response is cacheable, the response is cached in the memory. the browser decodes the response (gzip compression is not taken into account) 10. the browser decides how to respond. example, HTML, and media files 11. the browser renders the request, or a download dialog box is displayed.
 

What happened during the process from URL input to page loading?

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.