PageSpeed Metrics
Contents_Index
- LAB DATA (SYNTHETIC MEASUREMENTS)8
- FIELD DATA (REAL USER MONITORING - RUM)9
- CRITICAL RENDERING PATH1
- LONG TASKS2
- USER-CENTRIC METRICS1
- FIRST CONTENTFUL PAINT (FCP)2
- LARGEST CONTENTFUL PAINT (LCP)2
- CUMULATIVE LAYOUT SHIFT (CLS)2
- VISUALLY COMPLETE1
- SPEED INDEX3
- (HERO) ELEMENT TIMING3
- TIME TO INTERACTIVE (TTI)3
- TOTAL BLOCKING TIME (TBT)1
- FIRST INPUT DELAY (FID)2
- MAX POTENTIAL FIRST INPUT DELAY1
- NETWORK METRICS3
- TCP AND SSL/TLS LATENCY1
- TRANSFERRED BYTES4
- GOOGLE PAGESPEED INSIGHTS SCORE3
- USER TIMING1
- SERVER TIMING1
- FRAME RATE3
- DOMCONTENTLOADED1
- WINDOW.LOAD1
Lab Data (Synthetic Measurements)
8_ENTRIESMake a request to your page with a tool and evaluate performance. Be sure to make it realistic (e.g. by throttling network and CPU) and reduce noise (e.g. by running multiple times).
- Lighthouse
A tool built on Google Chrome to audit web pages. You can run it from Chrome DevTools, a Chrome Extension or from the command line (even with headless Chrome).
- Google PageSpeed Insights
Free and hosted Lighthouse reporting (and more) by Google.
- WebpageTest
Free and hosted web performance testing (also an open source project).
- Sitespeed.io
A set of open source performance monitoring tools.
- Calibre
Web performance monitoring SaaS.
- treo.sh
Web performance monitoring SaaS.
- SpeedCurve
Web performance monitoring SaaS.
- AwesomeTechStack
Website awesomeness monitoring Tool.
Field Data (Real User Monitoring - RUM)
9_ENTRIESCollect performance data from real users visiting your page. Be mindful of the actual overhead, as it runs in your user's browser and watch out for browser support of more recent metrics (e.g. compared to your user-base).
- Load abandonment
Track
visibilitychangeto account for survivorship bias. - SpeedCurve LUX
Real User Monitoring SaaS.
- Akamai mPulse
Real User Monitoring SaaS.
- Sematext Experience
Real User Monitoring SaaS.
- Perfume.js
Open Source Library to collect Field Data.
- Web Vitals
Open Source Library to collect Field Data.
- Vercel Analytics
Real User Monitoring based on Web Vitals.
Critical rendering path
1_ENTRIESThe critical rendering path is everything that happens between receiving network bytes and rendering something on the screen. To optimize any rendering metrics like First Contentful Paint (FCP) or Speed Index you have to understand how the critical rendering path works.
Long tasks
2_ENTRIESThe browser Main Thread that handles user input is also the one executing JavaScript (among many other things). Blocking the Main Thread for too long can make your page unresponsive.
A user perceives any visual change within 100ms as instant. Any task blocking the Main Thread by taking longer than 50ms is considered a long task (as it might make the browser unresponsive to user input).
To optimize interactivity metrics like Total Blocking Time (TBT) and First Input Delay (FID) you have to understand long tasks and how to avoid them as much as possible.
User-centric metrics
1_ENTRIESIt's important to track metrics relevant to users and their experience. To measure the perceived performance we can choose metrics by framing them around a few key questions.
-
Is it happening? - Did the navigation start successfully? Has the server responded? (e.g FCP)
-
Is it useful/meaningful? - Has enough content rendered that users can engage with it? (e.g. LCP)
-
Is it usable - Can users interact with the page, or is it still busy loading? (e.g TBT)
-
Is it delightful/smooth? - Are the interactions smooth and natural, free of lag and jank?
First Contentful Paint (FCP)
2_ENTRIESThe First Contentful Paint (FCP) metric measures the time from when the page starts loading to when any part of the page's content is rendered on the screen. For this metric, "content" refers to text, images (including background images), <svg> elements, or non-white <canvas> elements.
-
Lab: Lighthouse
-
Field: Chrome 60+, CrUX
Largest Contentful Paint (LCP)
2_ENTRIESThe Largest Contentful Paint (LCP) metric reports the render time of the largest content element visible within the viewport.
-
Lab: Lighthouse/WPT
-
Field: Chrome 77+
Cumulative Layout Shift (CLS)
2_ENTRIESA layout shift occurs any time a visible element changes its position from one frame to the next. CLS measures the sum total of all individual layout shift scores for every unexpected layout shift that occurs during the entire lifespan of the page.
-
Lab: Lighthouse/WPT
-
Field: Chrome 77+
Visually Complete
1_ENTRIESThe Visually Complete is the time from the start of the initial navigation until the visible (above the fold) part of your page is no longer changing. (e.g. WPT measures this using a color histogram of the page based on video/screenshots recording).
-
Lab: WPT
-
Field: N/A
Speed Index
3_ENTRIESSpeed Index shows how quickly the contents of a page are visibly populated (lower numbers are better). This is done by frequently measuring visual completeness during loading. The quicker the page is more visually complete the lower the value.
-
Lab: Lighthouse, WPT (but slightly different spec)
-
Field: N/A
(Hero) Element Timing
3_ENTRIESElement Timing captures when specific elements are painted by the browser. Hero elements can be defined as the largest h1, img or background image (or custom ones using the Element Timing API)
-
Lab: WPT
-
Field: Chrome 77+
Time to Interactive (TTI)
3_ENTRIESTime to interactive is the time it takes for the page to become fully interactive (as in Main Thread quiet for 5s). Sometimes called Consistently Interactice and not to be confused with First Interactive or First CPU Idle. (Warning: one of the most confusing and misunderstood metrics).
-
Lab: Lighthouse, WPT
-
Field: Not recommended as users interacting with your page can skew field measurements of TTI
Total Blocking Time (TBT)
1_ENTRIESThe Total Blocking Time (TBT) metric measures the total amount of time between First Contentful Paint (FCP) and Time to Interactive (TTI) where the main thread was blocked for long enough to prevent input responsiveness.
-
Lab: Lighthouse
-
Field: N/A
First Input Delay (FID)
2_ENTRIESFirst Input Delay (FID) measures the time from when a user first interacts with your site to the time when the browser is actually able to respond to that interaction. An interaction can be when users click a link, tap on a button, or use a custom, JavaScript-powered control.
-
Lab: N/A (as it requires the user to interact with the page)
-
Field: IE9+ (and Safari, Chrome, Firefox) (with polyfill - 0.4KB)
Max Potential First Input Delay
1_ENTRIESThe maximum potential First Input Delay that your users could experience. Basically equals to the duration of the longest long task on the browser Main Thread.
-
Lab: Lighthouse
-
Field: N/A
Network metrics
3_ENTRIESNetwork timing field data can uncover a non-optimized TLS setup, slow DNS lookups or server side processing and issues with CDN configuration. See also a separate section about measuring transferred bytes.
TCP and SSL/TLS latency
1_ENTRIES- Field: IE9+, Safari 9+
- Lab
Lab: See Qualys SSL Labs for an audit
Transferred bytes
4_ENTRIESYou can measure the byte weight of your assets with a number of tools. You would normally track these Lab only as the numbers are usually the same in the Field (but be mindful of device type or geographical location specific pages).
Measuring own (and third-party) JavaScript bytes is crucial as JavaScript is the main cause of high TTI or FID values.
-
Lab: Lighthouse (budgets), Sitespeed.io, custom tools
-
Field: N/A - but numbers usually the same as in Lab
Google PageSpeed Insights score
3_ENTRIESUser Timing
1_ENTRIESThe User Timing API allows the developer to create application specific timestamps that are part of the browser's performance timeline. e.g. you can create a user timing mark to measure when your JS has loaded for a specific component on the page.
-
Lab: Lighthouse, WPT
-
Field: IE 10+, Safari 11+ (and Chrome, Firefox of course)
Server Timing
1_ENTRIESSurface any backend server timing metrics (e.g. database latency, etc.) in the developer tools in the user's browser or in the PerformanceServerTiming interface.
Frame rate
3_ENTRIESThe frame rate is the frequency at which the browser can display frames. A frame represents the amount of work a browser does in one event loop iteration such as processing DOM events, resizing, scrolling, rendering, CSS animations, etc. A frame rate of 60 fps (frames per second) is a common target for a good responsive user experience. This means the browser should process a frame in about 16.7 ms.
-
Lab: Chrome and FF Devtools
-
Field: No browser implements the Frame Timing API yet but you can roll your own fps meter using
requestAnimationFrame