How do you write page speed into a website contract?

Write speed as a test, not an adjective: name the pages, the tool and its settings, the number of runs and the result each page must reach, then list what sits outside the developer's control. "The site will be fast" cannot be checked. "The home page meets the agreed mobile score, median of several runs, with final content" can be checked by either side.

For the testing routine itself, see my guide to testing a website before the final milestone. If speed is the main goal of the project, scope it as speed optimization work with its own deliverables.

Which numbers should a speed target use?

Start from Google's Core Web Vitals. For a good user experience, Largest Contentful Paint (LCP) should occur within 2.5 seconds, Interaction to Next Paint (INP) should be 200 milliseconds or less and Cumulative Layout Shift (CLS) should be 0.1 or less, measured at the 75th percentile of page loads, segmented across mobile and desktop (web.dev: Web Vitals). PageSpeed Insights passes a page on its Core Web Vitals assessment when the 75th percentiles of all three metrics are Good (PageSpeed Insights: about).

The other number most clients know is the Lighthouse Performance score. A score of 90 or above is considered good, 50 to 89 needs improvement and below 50 is poor (PageSpeed Insights: about). A perfect 100 is extremely challenging to achieve and not expected (Lighthouse: performance scoring), so never write 100 into a contract. Whether 90 on mobile is realistic depends on the design and features, so I usually agree the number after testing the current site or the heaviest page of the design.

Why does a new website need a lab-based target?

Because a new site has no real-user data yet. PageSpeed Insights reports field data from real users over the previous 28-day collection period, and a page might not have enough of it if it has been recently published or has too few samples from real users (PageSpeed Insights: about). Pages enter the Chrome UX Report, the source of that data, only if they are publicly discoverable and reach a minimum number of visitors, which Google does not disclose (Chrome UX Report: methodology).

So a launch target has to be a lab target, and lab tests have limits worth knowing before you sign:

  • INP: Lighthouse cannot measure INP, as there is no user input, and Total Blocking Time (TBT) serves as its lab proxy (web.dev: Web Vitals).
  • CLS: lab tools are only able to measure layout shifts that occur during page load, so lab CLS may be less than what real users experience (web.dev: CLS).
  • One device: lab data is a simulated load on a single device and fixed network conditions (PageSpeed Insights: about), and it is not a substitute for field measurement (web.dev: Web Vitals).

The thresholds are defined for real users, so a lab target borrows them for a simulated load. That is fair, as long as the contract says so.

What makes a speed target fair and testable?

It gives both sides the same result when they run the same test. Write down:

  • Named pages or templates. The home page plus one page of each main template. Web.dev advises a budget for different types of pages on your site since the content will vary (web.dev: performance budgets).
  • Tool and device. PageSpeed Insights on mobile, which simulates a mid-tier device (Moto G4) on a mobile network. PageSpeed runs in a Google data centre that can vary, and the report's environment block shows the test location (PageSpeed Insights: about). Record it with the Lighthouse version, as the score weightings have changed over time (Lighthouse: performance scoring).
  • Number of runs. Scores move between runs even when nothing changed. Google's variability guide says the median Lighthouse score of 5 runs is twice as stable as 1 run (Lighthouse variability), and Lighthouse CI runs three times against each URL and keeps the median report (web.dev: Lighthouse CI). Write "median of five runs", not a single test.
  • Where it is tested. Staging catches problems early, but the server and caching often change at launch, so the result that counts should come from production or an identical set-up. My notes on reviewing a staging site cover what else to check there.
  • Real content. Placeholder text and small sample images flatter the result, so test with your final copy and images.

Running Lighthouse in your own browser? Use a clean profile: extensions that inject JavaScript and antivirus software are among the causes of score swings Google lists (Lighthouse: performance scoring).

What does the developer control, and what do they not?

The developer controls the build: code, image handling, fonts and how scripts load. Other things that move the numbers often sit with you or a third party:

  • Hosting. LCP includes connection set-up time, redirect time and other Time To First Byte delays (web.dev: LCP), so a slow server shows up there. If the hosting is yours and the developer cannot change it, say so in the contract, or include server and hosting work in the scope. Server-side changes, such as upgrading PHP on a managed host, deserve their own check.
  • Third-party scripts. Chat services, video player embeds, advertising iframes, analytics and A/B testing scripts are typical third-party JavaScript, which is usually outside your control (web.dev: third-party JavaScript). Ads or widgets that resize themselves can also cause layout shifts (web.dev: CLS).
  • Later changes. Content, plugins, apps or tag manager tags added after approval change the page that was measured.

The fairest clause I know measures twice: once without third-party scripts, which is the developer's result, and once with the agreed list of scripts, reported for information or held to a looser target. On a WordPress build, that list often includes plugins you already rely on, so name them.

Should you add a page weight or image budget?

Yes, as a second target that is simpler to check than timings. A performance budget is a set of limits on metrics that affect site performance, such as the total size of a page, and it can be split into the maximum size of images, the number of web fonts, the size of scripts and the number of external resources such as third-party scripts (web.dev: performance budgets). The same page warns that these numbers don't tell you much about the user experience, so pair them with the speed metrics rather than replacing them.

Agree the limits for your own pages. A budget also protects the site after launch, because anyone uploading an image or adding a script can check it against the limit.

What does a sample speed clause look like?

Adapt it to your project and agree the numbers before work starts:

  • Pages: home page, one service page, one blog post and the contact page, with final content and images.
  • Tool: PageSpeed Insights, mobile, lab data, with the test location and Lighthouse version recorded for each report.
  • Runs: five runs per page; the median counts.
  • Target: a Performance score of 90 or above, LCP of 2.5 seconds or less and CLS of 0.1 or less, using the good ranges from PageSpeed Insights: about and web.dev: Web Vitals.
  • Where: the production server with caching on, tested during the review of the final milestone.
  • Third parties: measured once without third-party scripts (this result counts) and once with the agreed analytics and chat scripts (for information).
  • Exclusions: hosting changes not made by the developer, and content, scripts, plugins or apps added after approval.
  • After launch: field data, including INP, reviewed in Search Console for information once real traffic builds up.

How do you tie speed targets to an Upwork milestone?

Put the clause in the milestone itself. Upwork advises agreeing the first set of milestones, with amounts, deliverables and deadlines, before work starts, and making each milestone clear and specific (Upwork: milestones in fixed-price jobs). A speed target added after the build is finished is a new request, not a missed deliverable.

When the developer submits the milestone, you have 14 days to review it, and if you take no action in that time it counts as approval and the funds are released automatically (Upwork: review and pay). Run the agreed tests inside that window. If a page misses the target, request changes rather than approving: payment waits until the developer resubmits, and a new 14-day review window starts then (Upwork: review and pay). Share the results in Messages so both sides see the same runs.

What should you check after launch?

After about a month of real traffic, look at field data. Search Console's Core Web Vitals report shows how pages perform based on real world usage data, with URLs grouped into pages that have a similar user experience and group values covering 75% of page requests in the last 28 days. A URL group without a minimum amount of reporting data for both LCP and CLS is omitted from the report (Search Console: Core Web Vitals report), so a quiet site may show nothing for a while. If field results are poor although the launch tests passed, look at what changed since: scripts, content or hosting.

Keep rankings out of the contract. Google says Core Web Vitals are used by its ranking systems, but there is no single page experience signal, and good results in reports like Search Console's do not guarantee that your pages will rank at the top. Google Search always seeks to show the most relevant content, even if the page experience is sub-par (Google Search Central: page experience). Speed supports SEO work; it does not replace relevant content.