Re: navigationStart and the actual start of the navigation

Hello,

On Tue, Jul 1, 2014 at 5:23 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 7/1/14, 10:59 AM, Przemysław Pietrzkiewicz wrote:
>
>> Every other attribute of PerformanceTiming is supposed to happen not
>> earlier navigationStart as per [1]. So I'd assume that all of the other
>> parameters exclude more of the events of the navigation timeline.
>>
>
> That's correct, but there is no attribute that corresponds to "after the
> previous page has finished doing whatever it's doing" apart from
> navigationStart.


But we'd be keeping this bit, right? The part "This attribute must return
the time immediately after the user agent finishes prompting to unload the
previous document." would stay at it is.



>  I think it does match the goal - which is to measure the user perceived
>> time of the *browser navigation*.
>>
>
> Why do users care about this?


The users don't care about the difference, but also they will be not using
the API.

The developers might be interested in knowing what takes the time between
clicking a link (or confirming the beforeunload handler, or setting
window.location, etc.) and completing the load. Current wording of the spec
leaves parts of that time not represented in the recorded metrics for the
case of navigations that require a new browsing context.

Taking a step back, current wording defines navigationStart as:
- time of confirming the beforeunload prompt if there is one
- unclear what otherwise, as the rest of the spec mentions "if there's no
previous document" and you argue that there is always one

Proposed definition of navigationStart is:
- time of confirming the beforeunload prompt if there is one
- time of starting the navigation (as seen by the UA) otherwise

Are you worried about any concrete use case that would be broken by such
change?

Cheers,
Przemek

Received on Tuesday, 1 July 2014 15:59:03 UTC