最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - What does window.performance.getEntries() mean? - Stack Overflow

programmeradmin0浏览0评论

I thought that window.performance.getEntries() would match the number of requests according to Chromium's 'Network' tab, but that doesn't seem to be the case: .png. What am I missing?

I thought that window.performance.getEntries() would match the number of requests according to Chromium's 'Network' tab, but that doesn't seem to be the case: https://i.sstatic/OfKtH.png. What am I missing?

Share Improve this question edited May 27, 2015 at 1:34 ruakh 184k29 gold badges290 silver badges323 bronze badges asked May 26, 2015 at 10:30 feng Dfeng D 591 silver badge6 bronze badges 3
  • And what's the question? – phts Commented May 26, 2015 at 10:32
  • perhaps cached items aren't included? redirects? – CrayonViolent Commented May 27, 2015 at 1:40
  • If somebody finds a way how to get all the loaded resources (like in network tab of devTools), I will be very thankful. – mmm Commented Nov 22, 2019 at 9:02
Add a ment  | 

3 Answers 3

Reset to default 1

If your page have multiple redirections, network tab shows everything whereas performance entiries shows only the resources from last/current document. Also the entries count doesn't include your HTML/document count where network counts that too.

I would also like to refer https://stackoverflow./a/18978803's answer.

In my Case some Requests were missing, which occurred after the Page had finished loading. The Networking Tab showed all Requests, but window.performance.getEntries() only Showed those who responded to the original Page Call (and not later actions on the Page). I believe performance.getEntries() and the Resource Timing API only concern themselves with the original building of the Page.

Only taking chrome into consideration here, but the number of entries is limited. You can extend the limit by executing:

window.performace.setResourceTimingBufferSize(9999);
发布评论

评论列表(0)

  1. 暂无评论