addyosmani / timing.js

Navigation Timing API measurement helpers
1.5k stars 114 forks source link

Inconsistent firstpaint start time between IE and Chrome #29

Closed philipwalton closed 7 years ago

philipwalton commented 8 years ago

Chrome currently uses window.chrome.loadTimes().startLoadTime and IE/Edge use window.performance.timing.navigationStart, is there a reason both don't use the navigationStart mark?

In my experimentation, startLoadTime lines up with the fetchStart timing event, not the navigationStart event. It seems like timing.js should be consistent.

addyosmani commented 7 years ago

At the time I was seeing some (strangely) inconsistent numbers reported back when trying to align them around navigationStart, but you're right. We should align with just using navigationStart for both of them.

addyosmani commented 7 years ago

@philipwalton master should now reflect the suggested change. Thanks for feedback.

Is there anything else we can do to better improve the accuracy of timings being calculated elsewhere in the library?

philipwalton commented 7 years ago

Is there anything else we can do to better improve the accuracy of timings being calculated elsewhere in the library?

Not that I noticed, but I'll let you know if I see anything else. I mainly noticed this because I think the perf code for IOWA copied from this library.