惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
The GitHub Blog
The GitHub Blog
C
Check Point Blog
博客园_首页
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
F
Full Disclosure
Microsoft Security Blog
Microsoft Security Blog
爱范儿
爱范儿
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
G
GRAHAM CLULEY
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
C
Cybersecurity and Infrastructure Security Agency CISA
V
Vulnerabilities – Threatpost
K
Kaspersky official blog
博客园 - 司徒正美
S
Schneier on Security
T
The Exploit Database - CXSecurity.com
Project Zero
Project Zero
云风的 BLOG
云风的 BLOG
Cisco Talos Blog
Cisco Talos Blog
Know Your Adversary
Know Your Adversary
雷峰网
雷峰网
V
V2EX - 技术
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Spread Privacy
Spread Privacy
罗磊的独立博客
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
SecWiki News
SecWiki News
Schneier on Security
Schneier on Security
O
OpenAI News
Jina AI
Jina AI
PCI Perspectives
PCI Perspectives
Cyberwarzone
Cyberwarzone
Y
Y Combinator Blog
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog RSS Feed
I
InfoQ
D
Docker
P
Palo Alto Networks Blog
Recorded Future
Recorded Future
M
MIT News - Artificial intelligence
博客园 - Franky
B
Blog
Scott Helme
Scott Helme
博客园 - 叶小钗
D
DataBreaches.Net

博客园 - ifishing

VI操作 HTML中小meta的大作用【转】 10种AJAX/JavaScript特效实例让你的网站更吸引人 10 Smart Javascript Techniques to Improve Your UI [译] JavaScript核心指南(JavaScript Core) 【转】 IE7浏览器模式中表格tr/td渲染的一个bug 强制将IE8设置为IE7兼容模式来解析网页【转】 jquery 模块拖拽【转】 jquery的Theme和Theme Switcher使用【转】 打败 IE 的葵花宝典:CSS Bug Table【转】 三谈Iframe自适应高度【转】 ff3.5已不再支持 -moz-opacity[转] 玩转jquery插件之flexigrid 【转】 JS实例:网页上图片延迟加载的JS代码 图片预加载并且自动等比例缩放的JS插件[转] jQuery表格插件:帮助Web设计者驾御HTML表格【转】 Web开发者必须收藏的十大网站【转】 【转】打开,另存为,属性等14个javascript代码 【转】js实现另存为的方法 - ifishing - 博客园
IE9允许前端开发获取到页面性能数据
ifishing · 2010-07-05 · via 博客园 - ifishing

长期以来,为了改善站点的用户体验,我们一直都是在页面顶端加上一个 (new Date()).getTime() 来获取用户打开页面的时间,使用httpwatch来分析页面打开的解释时间。httpwatch虽然强大,但是还是无法让我们深入到用户的环境去了解用户打开页面前的一些情况,例如:DNS解释时间,请求和响应时间,以及更加深入的页面渲染时间等重要信息。这些信息对用户环境分析是至关重要的。

        如今,这个情况即将改变,微软的IE9将给前端开发们提供有力的性能分析接口让我们能够深入分析页面的性能,这就是强大的msPerformance接口。这个接口其实是基于HTML5草案Web Timing的定义来开发的(有意思的是这个接口是google提供的,chrome目前还没支持,IE9先行了)。

        我们来看看通过Web Timing我们可以获取到什么数据

window.msPerformance.navigation

 {

requestCount : 76

type : 0

startTime : 1277821481923

redirectedCount : 5

uniqueDomains : 31

}

window.msPerformance.timingMeasures

 {

request : 22

domContentLoaded : 342

response : 10

firstPaint : 29

domInteractive : 342

msStyleContentLoaded : 342

fetch : 459

domComplete : 342

load : 89

connect : 3

}

window.msPerformance.timing

 {

domLoading : 1277821481950

responseEnd : 1277821481960

navigationStart : 1277821481923

fetchStart : 1277821481923

msStyleContentLoaded : 1277821482293

firstPaint : 1277821481952

fullyLoaded : 0

requestStart : 1277821481927

loadEnd : 1277821482383

unloadStart : 1277821481923

}

通过这些数据我们可以更加深入得分析页面的性能和用户的网络环境,提供更加好的差异化服务。

 到这里下载IE9预览版

发现IE9pre3的console列出的接口不全,直接用调试器把这个接口和方法全部列出来了,更加直观