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.
Understand timings available - JavaScript Tutorial
From the course: Vanilla JavaScript: Web Performance Optimization APIs
Understand timings available
- [Instructor] With a navigation timing API, we can also get a list of timings. And on Level One, we get those timings through performance.timings. That will give us object with a lot of properties inside with timestamps. These timestamps will be from January 1970. So it looks like this. So you can go now and open any website, open the console, and type performance.timing, and you will see an object that will have a lot of big numbers, like in this case, those are timestamps, using Unix timestamp in milliseconds. Let's see each timing one-by-one. When you start the navigation, I mean, you are going to a URL, the browser first fires a navigationStart. NavigationStart doesn't mean yet the network. In this case, it's doing some kind of preparations. Preparations might be involved, for example, AppCache, that's a deprecated offline solution and also unloading previous pages or process a redirect. In that case, you will see that, also, there are a couple of optional timings where you're…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.