Throttling

Why a soft navigation step needs DevTools or provided throttling, per step or for the whole flow.

1 min read 1 section

A soft navigation step needs throttlingMethod: 'devtools' or 'provided'.

Lighthouse's default, simulate, estimates a throttled load from the requests that follow the document request. A soft navigation requests no document, so there is nothing to estimate from: the metric audits fail and the step gets a run warning.

The package can't switch the method for you. A flow has one config for all steps, and the package only knows a step is a soft navigation once it runs.

Per step or per flow

Set it on each soft navigation step, as in Usage, or once for the whole flow:

JavaScript
const flow = await startFlow(page, {
  config: softNavigationConfig({
    extends: 'lighthouse:default',
    settings: { throttlingMethod: 'devtools' },
  }),
});

The flow-wide setting applies to page loads too. Those then take longer, vary more between runs and no longer compare with PageSpeed Insights or a default Lighthouse run. Set it per step when page load numbers have to compare with those.

All pages

  • Getting started Introduction Introduction What a soft navigation is and what the package adds to Lighthouse user flows.
  • Getting started Usage Usage Install the package, measure a soft navigation step and read its result, with Lighthouse or user-flow.
  • Guides Throttling Throttling Why a soft navigation step needs DevTools or provided throttling, per step or for the whole flow.
  • Guides Limits and troubleshooting Limits and troubleshooting What a soft navigation step cannot measure, and what to do when one fails.