Scripts per page
How many scripts the page runs and their over-the-wire weight.
At a glance the headline numbers for Scripts per page
How many scripts the page runs and their over-the-wire weight.
The typical page runs 26 scripts weighing 554 KB.
Distribution & median INP site count and median INP at each level of scripts per page — n
Passing INP by scripts per page — n which level passes the INP most often
Scripts per page — n 26. p75 48. p99 154. At the low end (0): INP 111ms. At the high end (>p98): INP 130ms. computed
Distribution & median INP site count and median INP at each level of scripts per page — size
Passing INP by scripts per page — size which level passes the INP most often
Scripts per page — size 554 KB. p75 1,009 KB. p99 3.7 MB. Spearman with INP r = +0.33. At the low end (0 KB): INP 114ms. At the high end (>p98): INP 137ms. computed
Why this matters for the Core Web Vitals, and where to start fixing it
Script weight is the most expensive weight. A kilobyte of JavaScript costs more than a kilobyte of image, because after the download it is parsed, compiled and executed on the main thread. That is the same thread that must answer every click and keystroke, which is why script totals track INP.
The count matters next to the bytes: every script is a potential long task and another spot for the main thread to stall. Most pages would lose nothing by deferring most of their scripts. The ones that truly must run early are rare.
How do scripts affect the Core Web Vitals?
Scripts per page correlates with the INP. Script count separates passing sites from failing sites more than script weight does. Where the script count is low, 73% of sites pass the INP. Where it is high, 86% do. The rise is gradual.
Chrome field data from 94,910 sites, representing millions of real page loads. How we measured.