From the course: Vanilla JavaScript: Web Performance Optimization APIs

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Navigation Timing Level 1

Navigation Timing Level 1 - JavaScript Tutorial

From the course: Vanilla JavaScript: Web Performance Optimization APIs

Start my 1-month free trial

Navigation Timing Level 1

- [Instructor] The first client side API that appeared on the web regarding web performance is Navigation Timing API. This API is currently available on every browser including IE so Internet Explorer. It's basically creating a global object with the name performance available in the window so that's inside normal java script context and it's also available in web workers. The API is also the base for all the rest of measurement specs available. So the interface that this API is offering to us will also be useful for other performance APIs. The Navigation Timing API includes three basic functionalities the performance.now measurement system that we have already seen before. Getting information about the current navigation type and also the most important part to get timings for the current navigation. So let's start with the first two. We have already seen that we can call performace.now at any time and in that case we will get a timestamp from what is known as the timeOrigin. You can…

Contents