Skip to the indexed answers
Digital Marketing Index

usdigitalmarketingindex.com SEO

What should a web performance budget specify before a new site is built?

It should specify, in numbers, how fast each type of page must be for real users, how much the page may weigh to get there, how much of that weight third parties may use, and what happens when a release exceeds the limits. A budget written before design and development begin shapes decisions while they are cheap to make. One written afterward is a list of regrets. The numbers are the project’s own targets. Google publishes thresholds for a good experience on three metrics, and a project may adopt them or set stricter ones, but a budget for script size or request count is a choice the team makes, not a rule from Google.

Choosing user-centric metrics

Start from what a visitor experiences, and use the metrics Google documents for that.

Metric What it measures Published threshold for good
Largest Contentful Paint Loading Within the first 2.5 seconds
Interaction to Next Paint Responsiveness Less than 200 milliseconds
Cumulative Layout Shift Visual stability Less than 0.1

Those thresholds are from Google’s documentation (Google’s documentation on Core Web Vitals). They are assessed on field data, which does not exist before launch. A pre-launch budget therefore needs lab equivalents, measured under a defined test profile, plus resource limits that make the outcome achievable.

Define the test profile in the budget itself: the device class emulated, the network throttling, the tool, and the location. A target without a profile cannot be checked.

Server response time sits underneath these metrics, and a CDN does not settle it merely by being present. Why it can stay slow is covered in the guide to why Time to First Byte might remain high despite using a CDN.

Page-type-specific targets

One number for the whole site hides the differences between a text article and a product listing. Set targets per template.

A short launch budget. Every figure is a project target, chosen for this example. None is a Google requirement, apart from the three thresholds named above, which the example adopts and in places tightens.

Target (project-defined) Home Article Product listing Product detail
LCP, lab, mobile profile 2.0 s 1.8 s 2.2 s 2.2 s
Total blocking time, lab 200 ms 150 ms 250 ms 250 ms
CLS, lab 0.05 0.05 0.05 0.05
JavaScript, compressed 170 KB 120 KB 200 KB 200 KB
Images above the fold, compressed 150 KB 100 KB 200 KB 150 KB
Total page weight, compressed 700 KB 500 KB 900 KB 800 KB
Requests 40 30 50 45
Server response time for HTML 400 ms 400 ms 500 ms 500 ms
Web font files 2 2 2 2

Total blocking time stands in for responsiveness in the lab, where there are no real interactions to measure.

After launch, add field targets for the same templates, using the three documented thresholds at the 75th percentile of visits as the minimum.

How to choose the numbers:

  • Measure two or three sites that serve the same audience well, under your test profile, and aim at or below them.
  • Work back from the experience target. If LCP must be 2.0 seconds on a throttled connection, the bytes that must arrive before the main content can paint are limited by that connection’s speed.
  • Leave headroom. A budget set at the exact limit is exceeded by the first addition.

Third-party script allowances

Third-party code is added by many hands after launch, and nobody is assigned its total. Give it a line of its own.

Allowance (project-defined) Limit
Third-party JavaScript, compressed 80 KB of the page's script budget
Third-party requests on load 10
Scripts allowed to load before the page is interactive Consent tool only
Tags in the tag manager A named list, each with an owner
New third party Requires a measured cost and an approver

Rules that make the allowance hold:

  • Every third-party script has a named owner and a stated purpose.
  • Each is loaded asynchronously, and after the main content unless it must run earlier.
  • Adding one requires removing or justifying the excess.
  • The list is reviewed on a schedule, and scripts without an owner are removed.

Release gate and exceptions

A budget that is not enforced is a wish. Specify the mechanism.

  1. Automated checks in the build pipeline run the lab test on each template and compare against the budget.
  2. A release that exceeds a limit fails the check.
  3. Size limits for scripts and styles are checked at build time, where they are cheapest to catch.
  4. Field data is reviewed weekly after launch against the field targets.

Exceptions need a process, or every overrun becomes one.

Exception rule Content
Who may approve A named role, not the person requesting
What the request must state The feature, its measured cost, why it cannot fit, and what was tried
Duration A date by which the page returns within budget, or the budget is formally revised
Record Logged, with the measurement
Trade Where possible, something else is removed to pay for the addition

Decide also who owns the budget. A single named person or role answers for it, and has the authority to block a release.

Revisit the numbers. A budget is revised deliberately, with evidence, when the audience’s devices change or a template’s purpose changes. It is not revised by drift.

What the budget should contain, as a checklist:

  • The test profile
  • Experience targets per template, lab and field
  • Resource limits per template
  • A third-party allowance and its rules
  • The release gate
  • The exception process
  • The owner
  • The review date

A budget prevents problems. When an existing page already misses its loading target, the task is diagnosis, as described in the guide to diagnosing poor Largest Contentful Paint across an article template.

The test of a budget: could a developer read it and know, before writing any code, whether a proposed feature fits?

Link trail

Reader comments on this answer

Add your comment to this answer

Your email address will not be published. Required fields are marked *