如何使用 Javascript(库)分析浏览器页面加载?
我对此做了很多研究,但我认为我可以将我所拥有的东西进行众包,看看是否有人可以为我所拥有的东西提供补充。所以我希望能够使用 JS 确定页面加载时间。页面加载不仅仅是单个数字,而是细分。
首先我发现的是一个新的 W3C 规范(草案): https://dvcs.w3.org/hg /webperf/raw-file/tip/specs/NavigationTiming/Overview.html
这将是完美的,但它仅限于 Chrome 和 IE,并且浏览器之间仍然不一致。
但现在我发现了 New Relic 的真实用户监控 (RUM),它基于 Steve Souders 的 Javascript 库。据我所知,他们可以确定我从新的 w3c 草案中看到的相同数据。
他们似乎正在使用 HTTP Archive:http://code.google.com/p/httparchive/< /a>
但是,我似乎找不到有关页面性能或加载的任何信息,因此我不确定我是否正在查看正确的库。
当然,如果还有其他任何内容可以提供有关页面分析的更多信息,欢迎我提供这些信息。
I've been doing a lot of research on this, but I figure I could crowd-source with what I have and see if anyone can offer additions to what I have. So I want to be able to determine page load time using JS. Not just page load as a single number, but as a breakdown.
First what I found was a new W3C Specification (Draft):
https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html
This would be perfect, however its limited to Chrome, and IE, and it's still inconsistent between the browsers.
But now I have found Real User Monitoring (RUM) by New Relic that is based off of a Javascript Library by Steve Souders. From what I can tell they can determine the same data that I saw from the new w3c Draft.
It seems that they are using HTTP Archive: http://code.google.com/p/httparchive/
However, I cannot seem to find any information on page performance or load, so I wasn't sure if I was looking at the correct library.
Now of course, if there is anything else out there, that could provide more information on page profiling, I am welcomed to the information.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看 Yahoo 的 Boomerang.js (https://github.com/yahoo/boomerang)。
应该允许您滚动自己的 RUM 并进行优雅的降级,因此您仍然应该从没有 navigation.timing 的浏览器中获取一些信息。
另外,如果您可以访问 Windows,请使用 dynatrace 的工具 - 可以很好地了解页面加载期间发生的情况(在 IE 和 FF 中)
Have a look at Boomerang.js (https://github.com/yahoo/boomerang) by Yahoo.
Should allow you to roll your own RUM and does graceful degradation so you should still get some information from browsers without navigation.timing.
Also if you've got access to Windows have a play with dynatrace's tools - gives quite a good insight into what it going on during page load (in IE and FF)