Course contentsShow
← Web Development
Lesson 1935 of 2,98235. Web Performance FundamentalsFree lesson

Total Page Weight Budgets

Establishing maximum page weight including all resources to ensure fast downloads on target connections.

Total Page Weight Budgets

You'll learn how to set a hard limit on the combined size of everything your webpage downloads to guarantee fast loading on real user connections.

What It Is

A total page weight budget is the maximum combined size of all resources your page delivers—HTML, CSS, JavaScript, images, fonts, videos, and everything else. Think of it like a backpack weight limit for hikers: exceed it, and you slow down dramatically. Exceed your page weight, and users on slower connections suffer long load times or abandon your site entirely.

Why Total Weight Matters

While you've set budgets for JavaScript and images individually, users don't download resources in isolation—they download everything. A page with 200 KB of JS, 500 KB of images, 100 KB of CSS, and 300 KB of fonts totals 1.1 MB, which takes ~7 seconds on a 3G connection. That's the entire user experience.

Total page weight directly impacts:

  • Initial load time on target connection speeds
  • Data costs for users on metered connections
  • Time to Interactive when all critical resources parse

Setting Your Budget

Choose based on your target audience's connection profile:

  • Fast 4G/5G sites: 1–1.5 MB
  • Mixed connection sites: 500 KB–1 MB
  • Emerging markets/3G: 250–500 KB

Formula: Page Weight = HTML + CSS + JS + Images + Fonts + Other

Monitor with tools like Lighthouse or WebPageTest's "Total Requests" and "Total Transfer Size." Enforce budgets in CI using bundlesize or Lighthouse CI thresholds.

Key Takeaway:
A total page weight budget caps the combined download size of all resources, ensuring your page loads acceptably fast for users on your slowest target connection.