Performance API
The browser interface for high-precision timing, which lets page code read measurements such as navigation phases, resource loads and custom marks.
In more detail
Everything is exposed through the global performance object. performance.now() returns a precise timestamp, performance.getEntriesByType() returns recorded entries such as navigation timing, and PerformanceObserver reports new entries as they happen.
Related terms
- Navigation Timing API — The part of the Performance API that records a timestamp for each step of loading the current page, from DNS lookup to the document being ready.
- performance.now() — A function that returns a high-resolution timestamp in milliseconds, with fractions, for measuring how long something takes.
- PerformanceObserver — A browser API that calls you back whenever new performance entries of chosen types are recorded, such as largest-contentful-paint or event timings.
Taught in
- How Browsers Work: Navigation, DNS, TCP, TLS And Request Timing — Frontend Architecture & Web Platform
- requestAnimationFrame vs requestIdleCallback: High-FPS Work — Frontend Architecture & Web Platform
- Core Web Vitals: Measuring And Optimizing LCP, INP, And CLS — Frontend Architecture & Web Platform