web本质是什么呢?
用户请求远程资源
浏览器查找远程资源,打包用户请求并发送
服务器根据用户请求的资源路径及附带参数,配合自身逻辑生成相关内容,发送给浏览器
浏览器解析结果,翻译为直观方式呈现
具体步骤:
url--->server host
浏览器http打包请求
创建tcp连接
浏览器发送请求
服务器交给相关进程处理请求
服务器响应请求,发送浏览器
浏览器生成渲染树和DOM树渲染页面
处理页面切入资源和一步请求
非常规响应处理
一个页面访问的本质是通过一个路径找到相应的资源
路径就是URL,资源是服务器给我们的请求的响应
要像找到资源的,需要找到网络上的服务器才能找到机器上的资源,网络主机的定位靠的是IP地址
域名到IP
域名和IP对应DNS
URL--IP address
DHS是键值对
键----域名
值--ip地址
DNS解析
浏览器缓存,如果之前访问过该主机,浏览器会缓存在dns一段时间,这样就可以直接使用浏览器缓存的dns,至于一段时间是多久没要求,浏览器自行决定
系统缓存,如果浏览器缓存里没有记录,浏览器会做系统条用,获取系统中缓存记录
路由器缓存们如果系统缓存通用没有命中,那就需要查询路由器缓存了


浏览器和服务器的信息传输依靠tcp协议


option:各种方法的设置
trace:路由,看从本地网络访问到远程服务器经历了哪些节点





网友评论