如图,用firebug分析网页,发现连接处有很多阻挡,而且时间很长,在firebug的官方wiki中找到了 “阻挡” 的解释(内容来自http://getfirebug.com/wiki/index.php/Main_Page):

Request Timeline

Every request-response round trip is shown as horizontal bar in the Timeline and is composed of several phases, represented by different colors. Hovering a Request Timeline offers more detailed information about the timings of the different phases.

Value Display Description
Blocking   Time spent in a browser queue waiting for a network connection (formerly called Queueing)
For SSL connections this includes the SSL Handshake and the OCSP validation step.
DNS Lookup   DNS resolution time
Connecting   Elapsed time required to create a TCP connection
Sending   Sending request headers
Waiting   Waiting for a response from the server
Receiving

(from cache)

Time required to read the entire response from the server (and/or time required to read from cache)
'DOMContentLoaded' (event) (blue line) Point in time when DOMContentLoaded event was fired (since the beginning of the request, can be negative if the request has been started after the event)
'load' (event) (red line) Point in time when the page load event was fired (since the beginning of the request, can be negative if the request has been started after the event)
'MozAfterPaint' (event) (green line) Point in time when a MozAfterPaint event was fired (since the beginning of the request, can be negative if the request has been started after the event)
Time stamp (olive line) Time stamp created via console.timeStamp()

第一个 Blocking 翻译成中文解释为:

所花费的时间在浏览器中队列(前称为排队等待网络连接)
SSL连接的,这包括SSL握手和OCSP验证步骤。

即队列等待时间。

浏览器的队列等待时间与浏览器的并发数有关,常见浏览器的并发数如下:

浏览器       HTTP 1.1      HTTP 1.0
IE 6,7           2                 4
IE 8              6                 6
Firefox 2        2                 8
Firefox 3        6                 6
Safari 3, 4      4                 4
Chrome 1,2     6                 ?
Chrome 3       4                 4
Opera 9.63,10.00alpha      4       4

例如Firefox3 对于一个主机(同一主机域名),一次性只能处理6个请求,而多余的请求则处于队列当中。

为了提高反问速度可以给网站家更多的域名,如京东就是采用更多的域名来提高并发

引用:http://hi.baidu.com/thinkinginlamp/blog/item/e6409313f6ae1c866438db4c.html

浏览器并发连接数
2008年10月10日 星期五 下午 9:41
作者:老王

这是个老话题了,先总结一下HTTP1.1下主流浏览器在单个主机下的并发连接数:

IE7      2
IE8      6
Firefox2 2
Firefox3 6

看上去巧合的是:老版本的IE和Firefox都使用较低的单个主机并发连接数(2),而新版本的IE和Firefox都使用较高的单个主机并发连接数(6)。说起来老版本的IE和Firefox之所以采用较低的单个主机并发连接数是有道理的,在RFC2616里明确要求了单个主机并发连接数的数目:

Clients that use persistent connections SHOULD limit the number of simultaneous connections that they maintain to a given server. A single-user client SHOULD NOT maintain more than 2 connections with any server or proxy. A proxy SHOULD use up to 2*N connections to another server or proxy, where N is the number of simultaneously active users. These guidelines are intended to improve HTTP response times and avoid congestion.

不过标准总会落后于现实。在当今的网络环境里再使用较低的单个主机并发连接数已经越来越显得不合时宜了,所以说新版本的IE和Firefox才会不约而同的采用较高的单个主机并发连接数。

不过很多时候我们为了效率还想得到更高的并发连接数,比如说我们总会看到一些大网站采用独立域名或者二级域名来设置专门的图片服务器,其实有一部分原因就是为了增加并发连接数。至于使用独立域名还是二级域名的差别在于Cookie的影响,当使用和主站根域名相同的二级域名时,请求的同时也会捎带着传递主站根域名的Cookie,而使用和主站根域名不同的独立域名时,则不会受主站根域名Cookie的影响,所以带宽占用会更小一些。

不过也不是说并发连接数越大越好,假如新版浏览器得到普及,即使你的网站的平均流量还维持在和以前一样的水平,那么峰值流量也会成倍增加。

顺便说说Firefox下怎么调整单个主机下的并发数:

# about:config
network.http.max-connections                      : 30
network.http.max-connections-per-server           : 15
network.http.max-persistent-connections-per-proxy : 8
network.http.max-persistent-connections-per-server: 6

需要说明的是HTTP1.1下以network.http.max-persistent-connections-per-server的指为准,这是因为HTTP1.1下缺省都是持久连接,反之如果是HTTP1.0,则以network.http.max-connections-per-server为准。

如果你使用TamperData检测一下,就能发现:

HTTP1.1下Connection: Keep-Alive
HTTP1.0下Connection: Close

转载于:https://blog.51cto.com/linux521/875813

firebug “阻挡”相关推荐

  1. firefox firbug 的“阻挡” blocking

    为什么80%的码农都做不了架构师?>>>    用firebug分析网页,发现连接处有很多阻挡,而且时间很长,在firebug的官方wiki中找到了 "阻挡" 的 ...

  2. firefox firbug 的“阻挡”

    2019独角兽企业重金招聘Python工程师标准>>> 如图,用firebug分析网页,发现连接处有很多阻挡,而且时间很长,在firebug的官方wiki中找到了 "阻挡& ...

  3. firebug 的使用

    [Firebug - Console控制台视图] console API文档, http://www.getfirebug.com/console.html console.info显示(i)图标 在 ...

  4. Firebug Console 与命令行全集

    Console API 当打开 firebug (也包括 Chrome 等浏览器的自带调试工具),window 下面会注册一个叫做 console 的对象,它提供多种方法向控制台输出信息,供开发人员调 ...

  5. Selenium2(WebDriver)总结(二)---Firefox的firebug插件参数设置(补充)

    Selenium2(WebDriver)总结(二)---Firefox的firebug插件参数设置(补充) 本文是对上一节的补充:http://www.cnblogs.com/puresoul/p/4 ...

  6. 巧妙使用Firebug插件,快速监控网站打开缓慢的原因

    巧妙使用Firebug插件,快速监控网站打开缓慢的原因 原文 巧妙使用Firebug插件,快速监控网站打开缓慢的原因 很多用户会问,我的网站首页才50KB,打开网页用了近60秒才打开?如何解释? 用户 ...

  7. iptables+geoip来过滤阻挡来源IP

    有些时候,某些国家的IP一直在对服务器进行登录尝试或***等等,需要先将可疑IP分析出来,再用iptables来封掉它.延后又耗时费力.现在可以用xtables-addons,对来源IP进行阻挡. 1 ...

  8. firefox+firebug

    firefox+firebug可以随时调试页面样式,下载firebug插件的时候直接将zip安装包拖到firefox的应用栏目里面就可以安装了,重启firefox就可以使用了.

  9. Firebug和Yslow是个好工具

    火狐浏览器上装的Firebug很久没用了,昨晚打开Firebug和Yslow,边浏览博客边看代码,突然发现有几个404,果断打开模板编辑.这使得网页打开速度提高了16毫秒,优化代码如下: 1:删除了4 ...

最新文章

  1. 微信小程序实时聊天之WebSocket
  2. 【agc019F】Yes or No
  3. 成功解决TypeError: sequence item 0: expected str instance, bytes found
  4. Springcloud gateway获取post请求内容
  5. 《博客园精华集》Sharepoint+MOSS分册
  6. c++计算eigen随笔(1)
  7. python 图像格式转换_如何用六行Python构建图像类型转换器
  8. Vue中data为何以函数形式返回
  9. mysql5.7 主从数据库操作命令
  10. J2EE,J2SE,J2ME三者有什么不同?
  11. 华为转正答辩ppt范文_华为转正答辩模板下载ppt课件.ppt
  12. Pyrene-PEG-Biotin,芘丁酸聚乙二醇生物素,Biotin-PEG-Pyrene
  13. db4o and sematicweb
  14. 天池大数据《快来一起挖掘幸福感!》项目第169名
  15. (转)(异常分析) org.hibernate.MappingException: entity class not found
  16. 武汉安全员ABC证报名条件有什么要求?甘建二
  17. 创新实训【12】——热词查询功能
  18. matlab模糊系统设计 pdf,基于MATLAB的模糊控制系统设计.pdf
  19. 光猫拨号和软路由拨号失败服务器无响应,光猫拨号好还是无线路由器拨号好(一文解答你的疑惑)...
  20. BMP280读不出数据(附驱动),数据一直不变解决方法,硬件I2C

热门文章

  1. 中兴手机、泰康:微信营销的妙用与滥用
  2. 备忘1:爬取热门微博评论
  3. python学习第十天
  4. android 和RxJava配合使用的两个图片压缩框架LuBan、Compressor
  5. 如何设计安全可靠的开放接口---之AppId、AppSecret
  6. java.sql.Date日期比较
  7. NIC(Network Interface Controller,网络接口控制器)
  8. DELL-R730服务器U盘安装操作系统指南
  9. Linux:安装 telnet 命令
  10. [vSphere]关闭ESXi特定警报