Editorial review: Document PerformanceNavigationTiming.confidence#43528
Editorial review: Document PerformanceNavigationTiming.confidence#43528chrisdavidmills wants to merge 3 commits intomdn:mainfrom
Conversation
|
@chrisdavidmills This says "technical review". Is it ready for me to look at? |
@hamishwillee. Not yet; I requested a tech review from the browser engineers yesterday. Once it is ready, I'll flip it to "Editorial review". |
mmocny
left a comment
There was a problem hiding this comment.
The docs look great, thanks for doing it!
I'm not the primary engineering contact for this, so hopefully Mike Jackson at Msft will have a change to take a look.
One detail that is missing from the docs: how should you use this value and interpret the data on the server? This feels like the most important part of the API, and also the harder to understand for developers.
Mike has done some presentations on this, and I see that he added a NOTE to the very bottom of this spection of the spec: https://www.w3.org/TR/navigation-timing-2/#sec-PerformanceNavigationTiming
This section is intended to help RUM providers and developers interpret confidence
...that section might be worth including in docs here?
Cheers.
|
|
||
| {{APIRef("Performance API")}}{{SeeCompatTable}} | ||
|
|
||
| The **`confidence`** read-only property of the {{domxref("PerformanceNavigationTiming")}} interface returns a {{domxref("PerformanceTimingConfidence")}} object containing information that indicates whether the user agent considers returned navigation metrics to be representative of the current user's device. |
There was a problem hiding this comment.
"representative of the current user's device"
I see that this wording comes from the navigation timing spec itself. Personally, I don't like that phrasing.
It's more like "known to have adverse conditions affecting performance" or something.
I think its fine to leave to match spec, but maybe Mike Jackson wants to take the chance to wordsmith?
There was a problem hiding this comment.
Maybe something like: returned navigation metrics free from external system load unrelated to the page.
There was a problem hiding this comment.
I like @mwjacksonmsft's wording; I'll update the wording to that in the places where it appears.
|
|
||
| The **`confidence`** read-only property of the {{domxref("PerformanceNavigationTiming")}} interface returns a {{domxref("PerformanceTimingConfidence")}} object containing information that indicates whether the user agent considers returned navigation metrics to be representative of the current user's device. | ||
|
|
||
| For example, if the browser has launched from a "cold start" before loading a website or has resource-intensive extensions running, or if other applications running on the user's device are taking up a lot of resource cycles, web pages may load more slowly as a result. In such cases, a `low` confidence {{domxref("PerformanceTimingConfidence.value", "value")}} would be returned. |
There was a problem hiding this comment.
Some of these are aspirational right now.
Should we make it clearer what is actually (I think cold startup?) vs might one day be affecting?
Mike is the expert.
There was a problem hiding this comment.
At the moment, this works for cold start, and session restore. I'd prefer that we only highlight those items (or call out that the others are potential future cases and not currently implemented).
There was a problem hiding this comment.
I've updated the wording on both pages it appears on to:
For example, if a website has loaded after a browser "cold start" or session restore, its pages may load more slowly as a result.
| - {{domxref('PerformanceNavigationTiming.activationStart')}} {{ReadOnlyInline}} {{experimental_inline}} | ||
| - : A {{domxref("DOMHighResTimeStamp")}} representing the time between when a document starts prerendering and when it is activated. | ||
| - {{domxref('PerformanceNavigationTiming.confidence')}} {{ReadOnlyInline}} {{experimental_inline}} | ||
| - : A {{domxref("PerformanceTimingConfidence")}} object containing information that indicates whether the user agent considers returned navigation metrics to be representative of the current user's device. |
There was a problem hiding this comment.
Should we adjust the language here as well to match confidence/index.md?
There was a problem hiding this comment.
Good call; done.
|
|
||
| {{APIRef("Performance API")}}{{SeeCompatTable}} | ||
|
|
||
| The **`value`** read-only property of the {{domxref("PerformanceTimingConfidence")}} interface is an enumerated value indicating a broad confidence measure of whether the user agent considers returned navigation metrics to be representative of the current user's device. |
There was a problem hiding this comment.
Same question here - should we update this to match the verbiage in confidence/index.md
This makes sense. For the moment, I've gone for including all the text in this section in the Anyway, I'll include that in my next commit. |
|
Cool, thanks, @mwjacksonmsft. I'll move this to the editorial review stage. @hamishwillee, ready for you to have a look, if you've still got time early next week. |
Description
Chrome 145 adds support for the
PerformanceNavigationTiming.confidenceproperty, and the associatedPerformanceTimingConfidenceinterface. See https://chromestatus.com/feature/5186950448283648.This PR adds documentation for both features mentioned above.
Motivation
Additional details
Related issues and pull requests