当前位置:网站首页>从输入URL到页面展示这中间发生了什么?
从输入URL到页面展示这中间发生了什么?
2022-07-03 02:59:00 【夏赞恩】
1.万维网和HTTP协议
万维网WWW是一个大规模的、联机式的信息储藏所/资料空间(文字、视频、音频···),是无数个网络主站点和页面的集合。而这些资源需要统一资源定位符来进行标识。
统一资源定位符URL -> 唯一标识 -> 资源(文字、视频、音频···)
URL一般形式:<协议>://<主机>:<端口>/<路径>
用户通过点击超链接获取资源,这些资源通过超文本传输协议HTTP传送给使用者。
万维网使用超文本标记语言HTML,使得万维网页面设计者可以很方便地从一个界面的链接转到另一个界面,并能够在自己的屏幕上显示出来。
2. HTTP协议(无状态的)
HTTP协议定义了浏览器(万维网客户进程)怎样向WWW服务器请求WWW文档,以及服务器怎样把文档传送给浏览器。
用户浏览页面方法:
- 输入URL
- 点击超链接
浏览器具体过程:
浏览器分析URL
浏览器向DNS请求解析IP地址
DNS解析出IP地址(详见DNS系统)
浏览器与服务器建立TCP连接
浏览器发出取文件命令
服务器响应
释放TCP连接
浏览器显示(浏览器可以只下载文本部分)
HTTP采用TCP作为运输层协议,但HTTP协议本身是无连接的(通信双方在交换HTTP报文前不需要建立HTTP连接)
3. DNS系统
根:.
顶级域名:
- 国家顶级域名 cn,us,uk
- 通用顶级域名 com,net,org,gov
- 基础结构域名/反向域名 arpa
二级域名: - 类别域名 ac,com,edu,gov,net,org
- 行政区域名 用于我国各省、自治区、直辖市 bj,js
- 自己注册的域名(全球唯一)
三级域名:
pku.mail
四级域名…
域名服务器:
- 根域名服务器:(管理该根服务器注册的所有顶级域名):
- 顶级域名服务器(管理该顶级域名服务器注册的所有二级域名):
- 权限域名服务器(负责一个区的域名服务器):
- 本地域名服务器:当一个主机发出DNS查询请求时,这个查询请求报文就发给本地域名服务器。
域名解析过程:
- 递归查询(交给别人查询)
请求查询的主机先查本地域名服务器,本地域名服务器去查根域名服务器,根域名服务器去查顶级域名服务器,顶级域名服务器再找权限域名服务器, 找到后原路返回给请求查询的主机 - 递归与迭代相结合(有来有回)(第一步是递归查询,递给本地域名服务器去查询)
请求查询的主机先查本地域名服务器,本地域名服务器去查根域名服务器,根域名服务器告诉本地域名服务器下一步应该去查顶级域名服务器,顶级域名服务器告诉该本地域名服务器下一步应该去查权限域名服务器, 权限域名服务器把结果返回给本地域名服务器,本地域名服务器再把结果返回给请求查询的主机。
边栏推荐
- Installation and use of memory leak tool VLD
- Random shuffle note
- JS finds all the parent nodes or child nodes under a node according to the tree structure
- yii2 中andWhere多个or查询 orm条件
- "Analysis of 43 cases of MATLAB neural network": Chapter 43 efficient programming skills of neural network -- Discussion Based on the characteristics of the new version of MATLAB r2012b
- Counter统计数量后,如何返回有序的key
- Classes and objects - initialization and cleanup of objects - constructor call rules
- Distributed transaction
- [shutter] banner carousel component (shutter_wiper plug-in | swiper component)
- vfork执行时出现Segmentation fault
猜你喜欢

力扣------网格中的最小路径代价

I2C subsystem (III): I2C driver

Segmentation fault occurs during VFORK execution
![[fluent] JSON model conversion (JSON serialization tool | JSON manual serialization | writing dart model classes according to JSON | online automatic conversion of dart classes according to JSON)](/img/6a/ae44ddb090ce6373f04a550a15f973.jpg)
[fluent] JSON model conversion (JSON serialization tool | JSON manual serialization | writing dart model classes according to JSON | online automatic conversion of dart classes according to JSON)
![[shutter] banner carousel component (shutter_wiper plug-in | swiper component)](/img/a6/5c97ef3f34702b83ebf0511501d757.gif)
[shutter] banner carousel component (shutter_wiper plug-in | swiper component)

左连接,内连接

SqlServer行转列PIVOT

Your family must be very poor if you fight like this!

Choose it when you decide

"Analysis of 43 cases of MATLAB neural network": Chapter 43 efficient programming skills of neural network -- Discussion Based on the characteristics of the new version of MATLAB r2012b
随机推荐
Source code analysis | layout file loading process
Use optimization | points that can be optimized in recyclerview
左值右指解释的比较好的
[shutter] setup of shutter development environment (supplement the latest information | the latest installation tutorial on August 25, 2021)
yii2 中andWhere多个or查询 orm条件
The base value is too large (the error is marked as "08") [duplicate] - value too great for base (error token is'08') [duplicate]
销毁Session和清空指定的属性
Add automatic model generation function to hade
基于can总线的A2L文件解析(2)
Reset or clear NET MemoryStream - Reset or Clear . NET MemoryStream
ASP. Net core 6 framework unveiling example demonstration [02]: application development based on routing, MVC and grpc
Check log4j problems using stain analysis
Installation and use of memory leak tool VLD
你真的懂继电器吗?
模糊查询时报错Parameter index out of range (1 > number of parameters, which is 0)
HTB-Devel
How to implement append in tensor
Sqlserver row to column pivot
Xiaodi notes
Deep Reinforcement Learning for Intelligent Transportation Systems: A Survey 论文阅读笔记