Page Speed Experiments

An experiment shows what a change would do to your page speed before you build and deploy it. You pick one or more changes, for example remove a tag manager script or preload the hero image, and LoadFocus measures the page with and without them.

Nothing on your site changes. Each experiment audits the page twice, in fresh browsers: once as it is and once with your changes, in random order. Both versions are measured at the same moment, so the difference you see comes from the changes. The changes are applied only to the main HTML document the test browser receives.

Run an experiment

  1. Open a result of the monitor you want to test, from the Monitors page.
  2. Scroll to Try a change without deploying it.
  3. Pick a change type in the first row and fill in its fields.
  4. Click Add a change for each further change, up to 10. The × button removes a row.
  5. Click Run experiment.

An experiment takes about a minute. The result appears in the same section when it is done.

Change types

ChangeWhat you enter
Remove a scriptText the script URL contains, for example googletagmanager.com
Defer a scriptText the script URL contains
Load a script asyncText the script URL contains
Remove a stylesheetText the stylesheet URL contains
Preload a resourceThe URL to preload (a full URL or a path such as /images/hero.avif), its type (image, font, style, script or fetch), and High priority if it should load first
Add HTML to <head>The HTML to add, for example a <link rel="preconnect"> tag
Find and replace in the HTMLThe exact text to find in the HTML and what to replace it with

The HTML, find and replace fields take up to 5,000 characters each.

Because only the main HTML document is changed, a change can only match what is in that HTML. A script that another script adds while the page runs is not in it, so the URL-based changes cannot match it.

Read the result

The result first lists your changes, each with how many times it was applied. matched nothing on the page means the change had no effect: check the URL text or the exact text you entered, then try again.

A page that is not UTF-8 cannot take inserted text with accents or symbols. A change that would insert such text there is not applied and is marked skipped: this page is not UTF-8.

Below that, Without changes and With changes are compared side by side, in the same layout as Compare runs (see CI build gating): scores, metrics, page weight, new and removed requests, and the audits that started or stopped failing.

Past experiments lists your recent experiments for the monitor with their status (Running, Done or Failed). Click one to open its result again. An experiment that has not reported back after 15 minutes is marked as failed.

Ideas for what to try

The result page already points at good candidates:

  • Top opportunities names the biggest estimated savings, see Lighthouse opportunities.
  • In the Request waterfall, requests marked Render-blocking are worth trying with Defer a script or Load a script async, and requests marked Preload are already preloaded by your page.
  • The Largest Contentful Paint element in Performance diagnostics tells you which image to try with Preload a resource, see Largest Contentful Paint.

Limits

  • Up to 10 changes per experiment.
  • 3 experiments a day on the free plan, 30 on paid plans, counted over the last 24 hours. Each experiment is two test runs.
  • Monitors with a user journey, monitors that log in and monitors with authentication headers (see HTTP authentication) are not supported yet.
  • Experiments are not available for monitors that run from the Middle East (Bahrain) or Middle East (UAE) locations.
  • Team members whose role can only view can see experiments but not run them.