当前位置:网站首页>The whole process from entering URL to displaying page (interview)
The whole process from entering URL to displaying page (interview)
2022-06-12 23:56:00 【< I can't do anything;】
From input url The whole process from to the display page
- Enter... In the client URL url
- Will input url Send to DNS Get the corresponding WEB Server's ip Address
- Client browser and WEB Server setup TCP Connect
- The client browser sends to WEB Server send HTTP or HTTPS request
- WEB Server responds to requests , Returns the specified URL Data or error messages
- The client gets WEB Parse the source file after the data of the server , Page layout , Display the basic page
- Analyze the hyperlinks in the page , Render the page
1、 Input url Address
When you enter url After the address , The moment you press OK, the viewer will first look for the local cache , See if there is page data corresponding to the domain name , Load directly if you have , There is no next step
2、DNS lookup ip Address
- First on the local disk hosts Check whether there is a corresponding... In the file ip Address , Go straight back if you have
- Local hosts Not in file , Then you can further find local NDS The server , Find out if there is a corresponding... In its cache ip
- If local DNS The server doesn't have , Then go further and find DNS Root server . The root server does not store domain names and ip The mapping relation of , Instead, give the domain server address , Inform local DNS To find a domain server
- Local DNS And then send a request to the domain server , Such as
www.baidu.comYour domain server is.com. The domain server returns the corresponding ip Address and will ip Address in cache , It is convenient to return next time
3、 establish TCP Connect , send out HTTP request
- The viewer will use a random port (1024< port <65535) server-oriented WEB programmatic 80 Port application establishment TCP Connect
- establish TCP After the connection , The viewer sends a message to the server HTTP request , A normal browser can only launch GET perhaps POST request
4、 The server permanently redirects the response
- The server responds with a 301 Redirect Respond to , So the viewer can access
http://www.google.com/Instead ofhttp://google.com/ - Expand :
- 1. Why respond 301 Permanent redirection ?
- Because if a page has multiple access addresses , As above
http://www.google.com/andhttp://google.com/, Search engines will see these two addresses as different websites , This will cause multiple names of a page to appear in the cache , Waste of memory
- Because if a page has multiple access addresses , As above
- 2. Why redirect ?
- Website adjustment , Such as changing the directory structure of the web page
- The web page has changed its address
- Page extension changed
5、 The viewer displays HTML page 、 Load page resources
- HTTP After the request is successfully established , The server will send the resources requested by the browser to the browser , The viewer will parse the resources 、 Typesetting
- After that, the browser sends a request to get embedded in HTML The resource ( Such as images 、 Audio 、 video 、CSS、JS wait )
- thus , The whole process is finished , You will see a complete page
边栏推荐
- SAP 业务技术平台(BTP) 上的 Business Rules Service 使用介绍
- Is divicon still used in leaflet in H5 era?
- Enterprise wechat H5_ Authentication, H5 application web page authorization login to obtain identity
- NCF 的Dapr应用实例的运行
- KConfig
- Pytorch loading model error resolution
- 2022年电工(初级)操作证考试题库及在线模拟考试
- Actual combat | inductance element positioning -- detailed explanation of Halcon and opencv implementation (with source code)
- 如何快速查询手机号码归属地和运营商
- H5时代leaflet中还在用DivIcon?
猜你喜欢
![[matlab] matrix](/img/15/da3b530fca50080392c89e91998526.png)
[matlab] matrix

CV—BaseLine总结(从AlexNet到SENet的发展历程)

【Matlab】符号计算

How to pass the PMP review?

Leetcode 2164. 对奇偶下标分别排序(可以,一次过)

Is the PMP training organization an actual training?

基于Three.js海上风电数字孪生三维效果

PMP renewal | PDU specific operation diagram

支持Canvas的Leaflet.Path.DashFlow动态流向线

Accelerating with Dali modules
随机推荐
How to use Huawei cloud disaster tolerance solution to replace disaster recovery all-in-one machine
Start of u-boot S analysis (IV)
Theory + practice will help you master the dynamic programming method
【Matlab】符号计算
Start of u-boot S analysis (III)
3、 Storage system
Do you have to read for PMP?
2022-06-13日报: 图灵奖得主:想要在学术生涯中获得成功,需要注意哪些问题?
Tsinghua-Bosch Joint ML Center, THBI Lab:Chengyang Ying | 通过约束条件风险价值实现安全强化学习
Start of u-boot_ Armboot analysis (I)
NCF 的Dapr应用实例的运行
Running of NCF dapr application instance
Pytorch loading model error resolution
SAP QM qp03 displays an inspection plan with multiple specs inspection features
如何快速查询手机在网状态
2022年危险化学品经营单位安全管理人员考试试题及在线模拟考试
M_ 8: Design a MySQL table for message queue to store message data
【Matlab】矩阵
How to gracefully solve the offset problem of Baidu and Gaode maps in leaflet
【Matlab】矩阵变换与矩阵求值