Experiment with performance

I’ve been a bit under the weather this week with some aches and pains that have got me down. Hopefully with a bit of rest over the weekend they’ll be gone. So, this week’s newsletter will be a short-ish one. I’m never quite confident writing this at the start of my drafts, because once I get going … well, you’ve read some of the longer emails I’ve sent out.

As this email goes out, the EU aligned zone of Lazy Load ‘22 will be going live. Week one’s speakers include Tammy Everts, Annie Sullivan, Simon Hearne and my plus. There’ll be more great speakers to follow next week, plus a workshop by the WebPageTest team on Wednesday the 15th.

Speaking of WebPageTest, in this week’s newsletter we’ll be going through the the new Opportunities & Experiments features that were added to WebPagetTest over the last week. These are pretty powerful additions to what is an already very powerful platform.

What are Opportunities and Experiments

Opportunities are actionable snippets of advice from the WebPageTest team on how a site’s usability, speed, and/or resilience can be improved. The advice is presented specific to the results of the test that you have run. They can arm even the most non-technical user with a set of areas to focus on when looking to improve a site.

Experiments take opportunities a step further, by actually implementing the fixes and testing the site again to see what impact they would actually have. They have the potential to be an incredibly powerful tool to help developers build the case for implementing certain optimisations to a site.

Where can I find them?

Opportunities & experiments will be surfaced at the top of any WebPageTest test run. At the top of the Performance Summary page you’ll see three sections:

  • Is it quick?
  • Is it usable?
  • Is it resilient?

Clicking on one of these will take you to the Opportunities & Experiments page where you can go through all the recommendations.

Applying quick experiments

The WebPageTest team have create several pre-configured experiments that you can apply to your test with just a click. For example, if you have a render blocking JS file on your page, you can run an experiment that adds a defer attribute to it.

I believe you need a WebPageTest account to run experiments. Users with a free account can apply one experiment at a time, while Pro users can apply multiple experiments to the same test.

Running a test with experiments results in two new tests being run - a control, and the test with experiments applied. Once both finish, you will be presented with the results, and a comparison of key metrics between the two tests. The results that are presented are really clearly presented, and easy to understand.

Custom experiments

Probably the feature I’m most excited about, custom experiments allow for users to create their own bespoke experiments to run tests on. This has the potential to be a huge time saver during audits, where I would normally spend a fair chunk of time manually fluffling around between Cloudflare Workers and scripted WepPageTest runs. It should be noted that Custom Experiments is a paid feature, available to WebPageTest Pro users.

I’ve already used these features on one website audit, and it saved me a heap of time. It also allowed me to confirm or dismiss some assumptions I had made about the site based on waterfall charts. I’ll definitely be playing around with it a lot more in the coming weeks, especially to see how it works with the WebPageTest API!

The next issue of Optimised will be in your inbox on June 24th. The website has an archive of all previous emails. It's a good place to recap on anything we've covered, and also handy to share with friends or colleagues.

Keep well, stay safe.