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.
- Nic
http://nicj.net/
@NicJ
On 12/1/2014 5:20 PM, Ilya Grigorik wrote:
On Thu, Nov 27, 2014 at 11:45 AM, Jonathan Watt <[email protected]
<mailto:[email protected]>> 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