{"id":244107,"date":"2016-08-23T08:04:20","date_gmt":"2016-08-23T15:04:20","guid":{"rendered":"http:\/\/css-tricks.com\/?p=244107"},"modified":"2016-08-23T08:27:00","modified_gmt":"2016-08-23T15:27:00","slug":"use-webpagetest-api","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/use-webpagetest-api\/","title":{"rendered":"How To Use WebPageTest and its API"},"content":{"rendered":"

While the richness and interactivity of the average website has changed dramatically over the last decade, the same can be said about the expectations of those who consume it. This page<\/a> has a list of reports that show how businesses were able to establish a direct correlation between the their website’s performance and conversion\/revenue figures. For example, the engineering team at the Financial Times conducted a test<\/a> which showed that an increase of just one second in load time caused a 4.9% drop in article views.<\/p>\n

The underlying cause is pretty simple and it affects projects of all sizes (yep, including yours): users are becoming more demanding, less patient and not tolerant towards slow websites or applications. If your content takes too long to load, people will go somewhere else. Visiting a site that takes ages to open and navigate is a terrible user experience, especially on the dominant mobile environment where immediacy is crucial and battery life is precious.<\/p>\n

For that reason, website performance optimisation plays an increasingly important role in the success of any online property. All major browsers ship with tools that allow developers to keep an eye on some important performance metrics as the build progresses, but these are measured from the developer\u2019s own standpoint, which is not enough to see the full picture.<\/p>\n

Factors like geographic location, connection type, device, browser vendor or operating system can heavily influence perceived load times, so testing all these variables is the only way to get a (mildly) accurate representation of how a website is experienced by a broader audience.<\/p>\n

There are various tools and services<\/a> to approach that problem, but this article will focus specifically on WebPageTest<\/a>. We will look at it from a developer\u2019s perspective, in particular at using its RESTful API to extract vital information you can use to optimise the performance of your site.<\/p>\n

<\/p>\n

\n

Table of contents<\/h3>\n