Access to some of these features depends on your subscription level.
The script elements can be injected automatically or via the New Relic agent API by an APM agent installed in the back-end application, or they can be inserted manually via copy/paste. Both API calls and the copy/paste method allow you to control when and where the script elements are inserted.
|Method||Collecting page load timing information|
|Browsers with Navigation Timing Specification API||
For browsers that implement the Navigation Timing Specification API, page load timing information is read from the browser and reported to New Relic by the browser agent. The appropriate values simply are read from the webpage's performance timing object to capture the timing information.
|Browsers without Navigation Timing Specification API||
For browsers that do not implement the Navigation Timing Specification API, New Relic relies on the NREUM cookie and the browser agent to collect timing information.
|Resource Timing API|
|Single page app (SPA) monitoring|
- The inline HEAD placement ensures the instrumentation code is loaded before all other scripts so that wrapping will occur when other libraries are registered.
- Inline code placement also eliminates the network round trips caused by externally referenced scripts.
This summarizes how data is transmitted to and from the webpage:
|Data transmission||For http and https webpages||Frequency|
|Fetch the agent script||https||Once following page load|
|Send page load timing data||https||Once following page load|
|Send session trace data||https||Every ten seconds when there is activity and a session trace is occurring|
|Send SPA data||https||At the end of an interaction|
New Relic requires support of the SHA256 hash function, which some older operating systems do not support. If an end user lacks SHA256, the Browser agent will not connect to New Relic and data will not be sent.
For more help
Additional documentation resources include:
- Page load timing process (overview including time segments and colors, differences between app server requests and page load timing, outliers)
- Browser settings (agent instrumentation) (cross references to page load timing setup procedures for each New Relic agent)
For a "real world" example of how New Relic engineers used page load timing to improve our own app performance when developing New Relic Browser, read this blog post.