Performance
Page weight
Also called transfer size.
Page weight is the total bytes a page transfers over the network to load. It counts compressed bytes that crossed the wire, not the size of files on disk.
How it is measured
Open the DevTools Network panel, disable cache, reload, and read the 'transferred' figure in the footer. The 'resources' figure beside it is uncompressed size and is a different number. In code, `PerformanceResourceTiming.transferSize` summed across entries gives the same total, and a value of 0 means a cache hit.
Split the total by type: images, scripts, fonts, CSS, media. The HTTP Archive median mobile page is a few MB, but your own budget matters more, for example 1.5 MB on first load. Test cold cache and warm cache separately, and scroll the page to catch lazy-loaded files.
Worked example
A photographer's Astro portfolio loads at 6.8 MB. The Network panel shows 5.9 MB of JPEG, 420 KB of fonts across four weights, 310 KB of JavaScript, and 90 KB of CSS. The gallery images are 3000 px wide, displayed in 400 px slots.
After converting to WebP at 800 px with `srcset`, images fall to 1.1 MB and the page to 1.9 MB. On Lighthouse's slow 4G profile, LCP drops from 7.2 s to 2.9 s.
How it differs
Page weight counts bytes. Request count counts round trips. A page with 3 requests can weigh 8 MB because of one video, and a page with 140 requests can weigh 600 KB. Weight hurts on slow links and metered data; request count hurts on high latency and crowded connections.
Common errors
Reading file size on disk instead of transfer size. Measuring with the cache warm. Forgetting that lazy images only load as you scroll, so the total depends on how far the tester went. Counting only first-party files. Setting a budget with no check that fails the build when it is broken.
In practice
Set a budget, say 1.5 MB of first-load transfer for mobile landing pages, and add a Lighthouse CI or bundle-size check so a build fails when it is exceeded. Start by sorting the Network panel by size and fixing the top three files. Images are usually the first win.