All Docs | Index

Navigation Timing plugin API

Note: The Navigation Timing plugin hasn't been tested. Your help in testing it is appreciated.

The Navigation Timing plugin collects metrics collected by modern user agents that support the W3C Navigation Timing specification. The Navigation Timing API is encapsulated within the BOOMR.plugins.NavigationTiming namespace.

Note that the Navigation Timing plugin isn't included by default in boomerang.js. See Howto #9 for details on how to include the plugin in your boomerang deployment.

Methods

init()

Called by the BOOMR.init() method to configure the Navigation Timing plugin. The Navigation Timing plugin doesn't require any configuration parameters, since it simply reads values out of the browser's window.performance object (if available) and adds them to the beacon query string.

Returns

a reference to the BOOMR.plugins.NavigationTiming object, so you can chain methods.

Note

If the user agent being examined doesn't implement the Navigation Timing spec, the plugin won't add any parameters to the beacon.

is_complete()

Called by BOOMR.sendBeacon() to determine if the Navigation Timing plugin has finished what it's doing or not.

Returns

Beacon Parameters

The NavigationTiming plugin adds the following parameters to the beacon. Each maps onto a attribute from the browser's NavigationTiming API.

Beacon parameter NavigationTiming attribute
nt_red_cntwindow.performance.navigation.redirectCount
nt_nav_typewindow.performance.navigation.type
nt_nav_stwindow.performance.timing.navigationStart
nt_red_stwindow.performance.timing.redirectStart
nt_red_endwindow.performance.timing.redirectEnd
nt_fet_stwindow.performance.timing.fetchStart
nt_dns_stwindow.performance.timing.domainLookupStart
nt_dns_endwindow.performance.timing.domainLookupEnd
nt_con_stwindow.performance.timing.connectStart
nt_con_endwindow.performance.timing.connectEnd
nt_req_stwindow.performance.timing.requestStart
nt_res_stwindow.performance.timing.responseStart
nt_res_endwindow.performance.timing.responseEnd
nt_domloadingwindow.performance.timing.domLoading
nt_domintwindow.performance.timing.domInteractive
nt_domcontloaded_stwindow.performance.timing.domContentLoadedEventStart
nt_domcontloaded_endwindow.performance.timing.domContentLoadedEventEnd
nt_domcompwindow.performance.timing.domComplete
nt_load_stwindow.performance.timing.loadEventStart
nt_load_endwindow.performance.timing.loadEventEnd
nt_unload_stwindow.performance.timing.unloadEventStart
nt_unload_endwindow.performance.timing.unloadEventEnd
nt_ssl_st[optional] window.performance.secureConnectionStart
nt_spdy[optional] 1 if page was loaded over SPDY, 0 otherwise
nt_first_paint[optional] The time when the first paint happened. On Internet Explorer, this is milliseconds since the epoch, while on Chrome this is seconds.microseconds since the epoch. If you detect a decimal point in this number, multiply it by 1000 to compare it to the other timers.