Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider refactoring navigation-timing to extend resource-timing #11

Closed
toddreifsteck opened this issue Mar 25, 2015 · 9 comments
Closed
Assignees

Comments

@toddreifsteck
Copy link
Member

Much of the navigation-timing spec is the same as resource-timing. To avoid issues of copy/paste, perhaps we can define resource section in resource-timing spec and extend?

@igrigorik
Copy link
Member

We have attributes that were surfaced in one but not the other (e.g. linkNegotiation{Start,End}), and others use out of sync language, etc... big +1 to this!

As we discussed on the call today, it seems like we can build NT on top of RT?

/cc @plehegar

@plehegar
Copy link
Member

How would the prototype chain look like? We have 2 choices imho.

  1. we simply add NT attributes into the RT interface:
    partial interface PerformanceResourceTiming {}
  2. we extend the interface and define the NT attributes there:
    interface PerformanceNavigationTiming : PerformanceResourceTiming {}

I believe option 2 is the least disruptive.

@igrigorik
Copy link
Member

NT is a superset of RT.. +1 to option 2.

@toddreifsteck
Copy link
Member Author

+1 to option 2. Also, "algorithm" piece of the spec that refers to these fields should probably also be a pointer to a section within resource-timings spec as well.

@plehegar
Copy link
Member

A lot of the attributes in RT have the following text:
[[
If the last non-redirected fetch of the resource is not the same origin as the current document, secureConnectionStart/responseStart/requestStart MUST return zero unless the timing allow check algorithm passes.
]]

However, NT doesn't have the text. I presume this is intended and will have to be taken into account, correct? Ie the the document being navigated to isn't from the same origin, you still return a proper value (and not zero).

@plehegar
Copy link
Member

RT has initiatorType but NT doesn't. How about, in the case of NT, we return "navigation" for initiatorType (same as entryType)?

@plehegar plehegar assigned plehegar and unassigned toddreifsteck Jul 17, 2015
@plehegar
Copy link
Member

Reassigning this one to me so that I get around it.

@plehegar
Copy link
Member

See #36

@igrigorik
Copy link
Member

Resolved via #36, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants