Re: navigationStart and the actual start of the navigation

On 7/1/14, 7:41 AM, Przemysław Pietrzkiewicz wrote:
> "This attribute must return the time immediately after the user agent
> finishes prompting to unload the previous document. If no such prompt is
> displayed, this attribute must return the time of the event that
> triggered the navigation."

So if I have a click handler that does 2s worth of computation and then 
sets location, will the navigation start be at the location set or at 
the event dispatch point in time?

> I think a reasonable goal for the parameter would be to capture the
> duration of the navigation *as perceptible by the user* (to the extent
> of feasibility, of course). If we exclude things like locating the
> subframe to navigate or spinning up new browsing context, we can have
> navigations that feels sluggish but are reported as fast.
>
> What do you think?

I think it really depends on the goals here.  Are we trying to report 
things that are at least possibly under the control of the page being 
loaded, or not?

Is there a fundamental conceptual difference between a beforeunload 
handler that does a 3s sync XHR to save data and a click handler on 
anchors that does a 3s sync XHR to save data?  Does it matter whether 
the click handler does this before or after setting window.location?

-Bori

Received on Tuesday, 1 July 2014 13:24:55 UTC