在Google的Chrome浏览器的地址栏中中输入about:network,就可以打开Chrome监视分析网页浏览过程中请求头的变化(HTTP Header)。火狐浏览器有类似的插件Live HTTP Header,可用来实时跟踪浏览器与服务器端的HEADER请求,并导出日志供分析。网站性能优化的好工具。
点击Start I/O Tracking,开始跟踪页面访问过程,这是你可以重新加载需要跟踪的页面,或者在新标签页加载新页面。HTTP请求的过程在表中列出。下面是访问http://www.zhongguosou.com出现的统计信息:
+ New job : http://www.zhongguosou.com/
+ New job : http://www.zhongguosou.com/huibiao.gif
+ New job : http://www.zhongguosou.com/picture/Logo_25wht.gif
- Complete: http://www.zhongguosou.com/
- Complete: http://www.zhongguosou.com/huibiao.gif
- Complete: http://www.zhongguosou.com/picture/Logo_25wht.gif
+ New job : http://pagead2.googlesyndication.com/pagead/show_ads.js
- Complete: http://pagead2.googlesyndication.com/pagead/show_ads.js
+ New job : http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-
+ New job : http://pagead2.googlesyndication.com/pagead/ads?clie
- Complete: http://www.zhongguosou.com/default/zonghe_tools.html
+ New job : http://www.zhongguosou.com/default/computer_tools.html
- Complete: http://www.zhongguosou.com/default/computer_tools.html
- Complete: http://www.zhongguosou.com/humour_index.aspx
+ New job : http://www.zhongguosou.com/default/edu_tools.html
- Complete: http://www.zhongguosou.com/default/edu_tools.html
+ New job : http://pagead2.googlesyndication.com/pagead/ads?client=ca-p
+ New job : http://www.zhongguosou.com/blog/include/toplistindex.asp
+ New job : http://www.zhongguosou.com/chuandi_searchkey.js
- Complete: http://www.zhongguosou.com/chuandi_searchkey.js
- Complete: http://www.zhongguosou.com/blog/include/toplistindex.asp
- Complete: http://pagead2.googlesyndication.com/pagea
- Complete: http://pagead2.googlesyndication.com/pagead/ads?client=me=26
+ New job : http://www.google-analytics.com/urchin.js
- Complete: http://www.google-analytics.com/urchin.js
- Complete: http://pagead2.googlesyndication.com/pagead/ads?clien
+ New job : http://pagead2.googlesyndication.com/pagead/abglogo/abg-
- Complete: http://pagead2.googlesyndication.com/pagead/abglogo/abg-z
+ New job : http://pagead2.googlesyndication.com/pagead/sma6.js
- Complete: http://pagead2.googlesyndication.com/pagead/sma6.js
+ New job : http://www.google-analytics.com/__utm.g
+ New job : http://static.googleadsserving.cn/pagead/imgad?id=CIHEpJHC
+ New job : http://pagead2.googlesyndication.com/pagead/sma.png
- Complete: http://pagead2.googlesyndication.com/pagead/sma.png
- Complete: http://static.googleadsserving.cn/pagead/imgad?id=CIHEpJHCn
- Complete: http://www.google-analytics.com/__ut
在每个新工作(New job)后是Complete(完成)来对应。可以看出,我网站首页加载过程中,共请求19次。在跟踪过程中,你可以及时单击Stop I/0 Tacking来停止对网页请求的跟踪。
先单击Start Profilling进行配置,然后单击Show Performance按钮,再刷新你需要监视的网页,可以显示网页HTTP 请求的次数,时间,是否成功,具体效果看下图,右侧显示的时间长短:
看看其中记录的组成:
page url = http://www.zhongguosou.com/; loading time = 4087 ms; success.
frame url = http://www.zhongguosou.com/; page id = 1; type = 8 (main frame); load time = 3953 ms; success.
页面加载时间4087毫秒,成功。主框架加载时间3953毫秒,成功。