当前位置:网站首页>[web] the process that the browser enters the URL to the page display
[web] the process that the browser enters the URL to the page display
2022-06-21 04:39:00 【Elephant_ King】
technological process
Generally speaking, it is divided into the following processes
- NDS analysis : Resolve the domain name to IP Address
- TCP Connect :TCP Three handshakes
- send out HTTP request
- The server processes the request and returns HTTP message
- The browser parses the rendered image
- break link :TCP Four waves
What is? URL
URL It is the web address commonly known as my life , Follow the following syntax rules
scheme://host.domain:port/path/filename
The parts are explained as follows
- scheme - Define the service types of the Internet . Common protocols are http、https、ftp、file
- host - Define domain host ( Default www)
- domain - domain name , such as baidu.com.cn
- port - Port number ( The default is 80 port )
- path - Routing on server
- filename - Define documents / The name of the resource
One 、 Domain name resolution (DNS)
DNS The protocol runs in UDP The agreement above , Use port number 53, After entering the web address in the browser , First, domain name resolution , Will be similar to baidu.com Converting to the corresponding domain name is similar to
104.193.88.123
As for why not give a IP Address , It also saves the trouble of parsing , It is because we are more used to memorizing websites through words or letters than numbers , Computers are better at handling numbers , therefore DNS emerge as the times require
How to search by domain name in browser URL Medium IP Well
- Browser cache : The browser will cache at a certain frequency DNS Record
- Operating system cache : If the browser cannot find , Go to the operating system ==( Personal understanding is to find the operating system hosts file )==
- The routing cache : Routers also have DNS cache
- ISP Of DNS The server :ISP It is the establishment of Internet service providers ,ISP Specialized DNS The server corresponds to DNS request
- If you can't find , He will want to send a request to the server , Make recursive queries ( First visit the root domain name server .com Domain name server IP Address , And then visit again .baidu Domain name server , And so on )

Two 、TCP Three handshakes
3、 ... and 、 send out HTTP request
After three handshakes , Start sending HTTP Message request
The request message is sent by Request line 、 Request header 、 Request body Three parts 
- Request line : Including the requestor, Ah Fu 、URL、 Protocol version
- There are eight request methods :GET,POST,PUT,DELETE,HEAD,OPTIONS,TRACE
- URL
- Protocol version , Both HTTP Version number
- Request header : Contains additional information requested , By key word / value Pairs make up one pair per line , By English : separate
- Request body : It can carry data of multiple request parameters , But not all requests have request data
Four 、 The server processes the request and returns HTTP message
1. The server
For requests sent by different users , Will be combined with the configuration file , Delegate different requests to a program on the server that processes the corresponding requests , Then return the effect produced by the daemon processing as a response
2.MVC Background processing stage
MVC Divide the program into three core components : Model (MODEL)– View (view)– controller (controller)
View
Provide the user with the operation interface , It's the shell of the program
Model
Mainly responsible for data interaction
controller
Responsible for the commands that the user passes in from the view layer , Select the data in the model layer , Then carry out the corresponding operation , Present the final result
3.HTTP response message
The response message is sent by Response line 、 Response head 、 Response subject Three parts 
- The response line contains : Protocol version , Status code , Status code description
The status code rules can be viewed as This article - The response header contains additional information of the response message , from name / value To claim to be
- The response body contains a carriage return 、 Line breaks and response return data , Not all response messages have corresponding data
5、 ... and 、 The browser parses the rendered image
There are five steps
- according to HTML It is concluded that DOM Trees
- according to CSS Parse generation CSS The rule tree
- combination DOM Trees and CSS The rule tree , Generate render tree
- Calculate the information of each node according to the rendering tree
- Draw the page according to the calculated information
6、 ... and 、 break link
Reference article
Browser input a url The whole page shows what process it has gone through ?
边栏推荐
- Global and Chinese textile market 2022-2028: Research Report on technology, participants, trends, market size and share
- Redis supprimer la politique
- 搜索二维矩阵
- OFFICE、EXCEL、WORD、PPT操作技巧個人筆記本(持續更新)
- Process, thread and CPU
- Kprobe User Guide
- 图像分割背景介绍
- AcWing 90. 64 bit integer multiplication
- Golang practice record: Several usage examples of map
- Negative numbers in statistical ordered matrices
猜你喜欢

hack the box-challenges:Ransom题解

【CMake】CMake学习笔记

Office, Excel, Word, ppt Operation Skills Personal Notebook (continuously updated)

Part of anluan's basic problem series & brute force cracking series

Why is the performance of data visualization so important in 2022?

Six ways to restructure it to achieve productivity

Comment on the once stolen number artifact. What is the principle of QQ password cracking artifact?

Dotnet uses crossgen2 to readytorun DLL to improve startup performance

Hack the box challenges:ransom

Understand the meaning of defi lending and clearing
随机推荐
Global and Chinese market of compound milk 2022-2028: Research Report on technology, participants, trends, market size and share
Golang实践录:ssh及scp的实现
[opencv] - image contrast and brightness value adjustment
When you think you've captured all the anomalies... | daily anecdotes
Dual system installation
量子前沿英雄谱|光量子计算的“技术前锋”:Alireza Marandi
Analysis method of combinational logic circuit
kubernetes code-generator使用
数分学习-数据处理和可视化
CVE-2021-44228——Log4j2-RCE漏洞复现
Unity2D--获得一张图片里的多种图片
What are the safest spot silver warehouse building skills?
Flutter series: Builder in flutter
Office, Excel, word, PPT operating skills personal notebook (continuously updated)
Audio and video technology development weekly | 250
unity srpbatcher
From required function to designed circuit
【云原生|实践指北】5:真实业务场景下云原生项目落地实践学习1
[network] network Summary
Thymeleaf是什么