Re: navigationStart and the actual start of the navigation

Hello,

This is definitely true, Alois, and I also agree with the goal as put by
Arvind. Let me take a look at the spec with this goal in mind. Thanks for
bearing with me, Boris and Arvind!

For the navigations that take place in existing browsing contexts, we're
already not in bad position:
- the unload handlers *are* represented in the records, as navigationStart
is recorded before they are fired. For navigations within the same origin,
we also have explicit timing recorded in unloadEventStart and
unloadEventEnd.
- time to bring up the radio of a mobile device is not represented
explicitly, but this delay would be represented somewhere between
navigationStart and responseStart. One might wish for a more explicit
visibility, but this time is included in the records.

The thing we're missing, is the "prompting to unload" routine, which may or
may not include displaying the beforeunload prompt and waiting for the user
decision. I can see why the spec leaves this step out - as per Arvind's
statement of the goals, we want to capture the "user perceived latency",
and one could argue that the time the user decides whether to navigate is
not "navigation latency".

Starting the timer after the beforeunload handler (but before unload
handlers) seems to be a compromise between the goal of the spec and the
practical issue that the beforeunload step might or might not contain big
delays not perceived as the navigation latency. Does anyone feel that this
should be revisited?

On the other hand, the way that navigations in new browsing contexts are
captured does not comply with the goal seemingly by mistake, not in result
of any conscious trade-off. The time needed to bring up new browsing
context clearly is part of the latency perceived by the user.

Wdyt?

Cheers,
Przemek



On Wed, Jul 2, 2014 at 8:35 PM, Reitbauer, Alois <Alois.Reitbauer@ruxit.com>
wrote:

> From a users perspective the navigation does start once he clicks the
> link. Even unload handlers from the point of the user are attributed to
> the loading of the next page. Although this might not be correct
> technically it is the perceived behaviour by the end user.
>
> What do you think?
>
> // Alois
>
> On 27/06/14 08:53, "Boris Zbarsky" <bzbarsky@MIT.EDU> wrote:
>
> >On 6/27/14, 11:31 AM, Przemysław Pietrzkiewicz wrote:
> >> I see, thanks for the explanation. In this case, maybe we could go for:
> >>
> >> "This attribute must return the time when the user agent determines that
> >> the navigation will happen. For navigations from documents other than
> >> the initial about:blank of the browsing context, this is the time when
> >> the user agent finishes prompting to unload the previous document."
> >
> >Here's a question.
> >
> >Say I click a link like this: <a target="foo" href="bar">Click me</a>.
> >
> >The UA decides that a navigation will happen at the point when I click.
> >  Then it has to go look for a named target (which might take a while,
> >depending on how many frames are reachable from that document).  If it
> >finds one it will prompt to unload that document; if not, it will open a
> >tab/window/whatever.
> >
> >Should the time needed to find the named target be considered when
> >deciding when navigationStart is?  I guess it can't be if we want to
> >exclude the time it takes to fire beforeunload handlers...
> >
> >> Actually, the second sentence might be redundant - the time when the
> >> user agent determines that the navigation will happen in the presence of
> >> a document already loaded in the browsing context is the end of
> >> beforeunload.
> >
> >OK...
> >
> >But initial about:blank can also have beforeunload handlers, note,
> >though not in the case when the UA is creating a new browsing context
> >and then immediately navigating it.
> >
> >I guess an important question is this: how is browsing context creation
> >fundamentally different from beforeunload handler execution in terms of
> >whether it should be included in the time taken to load?  It sounds like
> >you want to include the former but exclude the latter, right?
> >
> >-Boris
> >
> >P.S. "when the user agent determines that the navigation will happen" is
> >a non-testable requirement, fundamentally; UAs can do whatever the heck
> >they want with it.
> >
>
>
> The contents of this e-mail are intended for the named addressee only. It
> contains information that may be confidential. Unless you are the named
> addressee or an authorized designee, you may not copy or use it, or
> disclose it to anyone else. If you received it in error please notify us
> immediately and then destroy it. Compuware Austria GmbH (registration
> number FN 91482h) is a company registered in Vienna whose registered office
> is at 1120 Wien, Austria, Am Euro Platz 2 / Gebäude G.
>

Received on Thursday, 10 July 2014 12:29:53 UTC