Page loaded conditions

By default, Lighthouse uses heuristics to decide when to finish a performance test. Page loaded conditions allow you to add an additional custom criterion.

Here are some cases when this can be useful:

  • you have a dashboard that only starts rendering after a slow XHR request has finished
  • you have a chat widget that loads late and sometimes isn't included in the test result, leading to a spike in your performance score

Creating a page loaded condition

  1. Create a new page or edit an existing one
  2. Open the Advanced Settings
  3. Expand the Page Loaded Condition section

Finding the setting to configure when Lighthouse finishes the test

  1. Click New
  2. Enter a JavaScript condition that must be fulfilled before the test finishes

Setting up a JavaScript expression that needs to be fulfilled when the test finishes

  1. Click Create
  2. Save the page you edited

Still need help? Contact matt@debugbear.com for support.
DebugBear is a website monitoring tool built for front-end developers. Track performance metrics and Lighthouse scores in CI and production. Learn more.
© 2020 DebugBear Ltd