Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the process of browsers visiting web pages?

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article is a detailed introduction to "what is the process of browser accessing web pages". The content is detailed, the steps are clear, and the details are properly handled. I hope this article "what is the process of browser accessing web pages" can help you solve your doubts. Let's go deeper and learn new knowledge together with the ideas of the editor.

client and server

To understand how browsers access web pages, you first need to understand the concepts of client and server.

As a standard three good students, we never lack time, the lack of only the ocean. I'm gonna have to fight mom and dad for this.

In this example, the browser on our computer is like a client. Need ocean but oneself do not have however, need to ask for from parents. Parents are like servers, waiting for their children's needs. The server is essentially a computer, just waiting for the needs of various clients. Once the client's request arrives at the server, the server will process it immediately.

After understanding the concept of client and server, you can look at the process of browser access in detail.

Web browser address resolution

The browser is a multifunctional client software. Once the user enters the address, the browser will extract the protocol, domain name, port and other information from the input address for later use.

DNS resolution

The server domain name information is stored in the address. Because the computer identification is the IP address identification method, it is necessary to obtain the IP address of the server through DNS resolution. For example, if I want to call my father for support, I can only call my mother first to ask if I can't find it in my address book.

DNS resolution in the first place is to experience local DNS resolution, if the local DNS resolution is not resolved through the Internet DNS server resolution.

1. There is a hosts file locally (window system C:\Windows\System32\drivers\etc\hosts file), which records the correspondence between domain names and IP addresses. Local DNS is the mapping of domain names and IP addresses by reading the file.

2. In the case that the local DNS resolution cannot get the IP address and the network is connected, the browser will dispatch the function of the Socket library to find the nearest DNS server and query the IP address of the server corresponding to the domain name.

TCP/IP connection established

After the DNS resolution is completed and the IP address is obtained, the TCP/IP protocol will be used to connect (specifically how to find the server side). The process of connecting is like the process from dialing a specific number to officially starting a conversation.

1. The client computer finds the server computer according to the IP address through various routing devices.

2. The client and the server send and receive messages three times to complete the connection establishment.

The process of sending and receiving information three times is also called three-way handshake. The essence of three-way handshake is to send and receive three flags to ensure that the connection is normal. It can be understood as:

a): Hello, can you hear me?

B): You can hear it!

c): Currently normal, you can start talking--

send HTTP requests

When the connection is established, go straight to the topic and clearly tell Dad that he needs Ocean's volunteer at present. If I speak any other language, yeah, maybe dad doesn't understand me. But if you use Chinese expressions, he will definitely understand them. So when the connection is established, the next specific communication has to be in the same language to communicate with each other. Browser client and server discussed a unified use of http protocol format to send and receive data.

The browser assembles the data in http format and sends it to the server in TCP/IP format.

The http protocol format of the data sent is as follows. Each line of each block has a fixed meaning, just like every word used in chat has a meaning and belongs to its own agreement.

Accept http response

When his father knew the purpose of this call, after considering it for a long time, he finally opened his mobile phone bank and silently transferred the money he had saved for a long time. Finally, the money was transferred. This process is a response.

The server transmits http formatted data to the client browser by using TCP/IP protocol

render the page

The browser displays the content when it gets the response.

1. Check the compression problem of Content-Encoding response body

If the content stored in the message is obtained by converting the original data through compression or encoding technology, then the value of Content-Encoding indicates the specific conversion method. Through the value of this field, you can know how to restore the converted data in the message to the original data.

2. Determine what type of data in the response message belongs to

The data that Web can process includes text, image, sound, video and many other types, and the display method of each data is different, so it is judged according to the value of the Content-Type header field of the response header.

3. According to the type of Content-Type, render the result to the browser page in different ways.

Read here, this article "browser access web page process is what" article has been introduced, want to master the knowledge of this article also need to practice to understand, if you want to know more related content of the article, welcome to pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report