RE: Disparity between time bases in HighResolutionTime and ResourceTiming

For cross-origin resource.



 Document A

         <iframe B>

                   SubResource C

                   …

         </iframe>



If C and B are in the same origin(or pass timing allow check), A is another
origin, shall we populator full timing info of C to B’s timeline?

If C and A are in the same origin(or pass timing allow check), B is
another, full timing info of C to B’s timeline?


thanks :)

Pan

 *From:* simonjam@google.com [mailto:simonjam@google.com] *On Behalf Of *James
Simonsen
*Sent:* Thursday, August 09, 2012 7:42 AM
*To:* public-web-perf
*Subject:* Disparity between time bases in HighResolutionTime and
ResourceTiming****

** **

Resource Timing says:****

** **

"...the user agent must record the system clock at the beginning of the *
root* document navigation..."****

** **

High Resolution Time says:****

** **

"...the number of milliseconds from the navigationStart attribute of the
PerformanceTiming interface, the start of navigation of *the* document..."**
**

** **

So in iframes, Resource Timing will be offset, but now() won't be. That
seems bad. We should be consistent.****

** **

We went with the root document in Resource Timing intentionally. We want to
present a uniform timeline that can just be displayed, including iframe
content.****

** **

So I think we should change High Res Time to match Resource Timing's
definition.****

** **

We should define "root document" too. I think we can work the cross-origin
concerns into that: walk the parent document chain as long as there's a
parent and it has the same origin as the current document. Wherever you
stop is the root document.****

** **

James****

Received on Wednesday, 22 August 2012 07:35:32 UTC