- From: Ilya Grigorik <igrigorik@google.com>
- Date: Mon, 8 Dec 2014 09:14:49 -0800
- To: Nic Jansma <nic@nicj.net>
- Cc: Jonathan Watt <jwatt@jwatt.org>, public-web-perf <public-web-perf@w3.org>
- Message-ID: <CADXXVKo7KJOrP4F=CPqun3SCz4h-bFdBAOrEbgo=ZKt3+6Uo_A@mail.gmail.com>
Hmm, well, it's not a big thing, but probably worth clarifying in the spec.
Personally, I do think it makes sense to allow
getEntriesByType("navigation") to return a one element array. Thoughts,
objections?
On Tue, Dec 2, 2014 at 8:35 AM, Nic Jansma <nic@nicj.net> wrote:
> IE's behavior is to return a single entry for
> performance.getEntriesByType("navigation"). It's the same data as
> performance.timing, though in DOMHighResTimeStamp format and with the
> "name", "duration" and "entryType" values set.
>
> - Nichttp://nicj.net/
> @NicJ
>
> On 12/1/2014 5:20 PM, Ilya Grigorik wrote:
>
> On Thu, Nov 27, 2014 at 11:45 AM, Jonathan Watt <jwatt@jwatt.org> wrote:
>
>> The draft describes the creation of an PerformanceNavigationTiming
>> instance in section 5, but it doesn't seem to say anything about how that
>> object becomes available to scripts. It also doesn't say much about the
>> sequence returned by performance.getEntriesByType("navigation") and what
>> entries are added to it and when they become available.
>>
>> * Are entries from anything other than the last navigation available?
>>
>
> No, only the current/last navigation is available
> via performance.timing.
>
>
>> * If so, what are the origin restrictions? If a non-same origin navigation
>> happens between two same origin navigations, does the sequence just not
>> contain the non-same origin navigations, or does everything prior to the
>> recent series of same origin navigations not appear in the sequence?
>> * Do new navigations appear at the beginning or end of the sequence?
>> * Does a back/forward destroy previous entries in the series, or just
>> add more to it?
>>
>
> None of these apply.
>
>
>> I'm guessing browser vendors don't want to use memory keeping previous
>> navigation entries around for the rare case that they might be used, so
>> maybe the sequence always only consists of a single entry. If so the spec
>> should say so explicitly though, and if not then the above should be
>> clarified with normative text even if the desired behavior might seem
>> obvious.
>>
>
> A quick spot check in Chrome and FF shows that both return an empty
> array for window.performance.getEntriesByType("navigation"). Not sure what
> we actually want here though... Perhaps for consistency with other events
> we should return an array with a single entry? I could be convinced either
> way.
>
> ig
>
>
>
Received on Monday, 8 December 2014 17:16:00 UTC