WebPageTest is a synthetic performance testing tool for websites that has evolved since its original public release in 2008. I originally developed it at AOL as a tool to provide developers information on the page load experience for end users (with realistic connectivity and in browsers that were used to visit sites). At the time, most developers used Firefox because the developer tools were much better than what were available in any other browser, and the data center that served the pages was right across the street, connected by fast ethernet to the office. In that environment, all pages loaded unrealistically fast and we needed a way to analyze and share the performance that users experienced in Internet Explorer, on Windows, and in the slow connectivity environments that existed at the time (dialup and slow DSL primarily).
The features, supported browsers, and platforms have evolved over time, but the core mission has been very consistent: to provide detailed information to developers about the loading performance of their pages in a realistic end user environment.
WebPageTest is an open source project on GitHub, available for people to install and use in whatever environment they would like, with a very liberal BSD license. There are several commercial testing platforms that use all or some of the WebPageTest code and it also powers the HTTP Archive (httparchive.org). The most visible instance of WebPageTest is the free, public one at webpagetest.org, which is a great demonstration of the performance community coming together with test locations provided by over fifty companies and individuals. As of September 2015, the public instance of WebPageTest is running 45,000 tests per day and there have been roughly 53 million tests run since it was launched in 2008.
WebPageTest is very much a developer tool, built mostly to help developers identify and solve frontend performance issues, so it can be a bit overwhelming at first, but hugely powerful once you get more familiar with it. I’m extremely grateful to O’Reilly, Andy, Marcel, and Rick for putting this book together to help people get past that hurdle and get the most out of WebPageTest.
—Patrick Meenan, lead developer and creator of WebPageTest
Independent site owners
We all know bad web performance when we see it. When something takes too long to load or become interactive, we start to get bored, impatient, or even angry. The speed—or lack thereof—of a web page has the ability to evoke negative feelings and actions from us. And when we lose interest, have to wait too long, or get mad, we may not behave as expected, which is to consume more content, see more advertisements, or purchase more products.
The Web as a whole is getting measurably slower. Rich media, such as photos and videos, are cheaper to download thanks to faster Internet connections but they are also more prevalent than ever. Expectations of performance are high and the bar is being raised ever higher.
Because you’re reading this book, chances are you’re not only a user but someone who can do something about this problem. There are many tools at your disposal that specialize in web performance optimizations. However, none is more venerable than WebPageTest.org. WebPageTest is a free, open source web application that audits the speed of web pages. In this book, we will walk you through using this tool to test the performance of web pages so that you can diagnose the signs of slowness and get your users back on track.
This book is organized into three primary sections: basic, intermediate, and advanced use cases, each of which corresponds to a different level of familiarity with WebPageTest:
Basic use cases provide a foundation of testing experience by explaining how to run and interpret simple tests.
Intermediate use cases have a deeper focus on more sophisticated test scenarios, some of which may require scripted commands to configure how the tests are executed.
Advanced use cases describe lower-level capabilities typically required by special test environments including the API and private instances.
The following typographical conventions are used in this book:
Indicates new terms, URLs, email addresses, filenames, and file extensions.
Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.
Constant width bold
Shows commands or other text that should be typed literally by the user.
Constant width italic
Shows text that should be replaced with user-supplied values or by values determined by context.
This icon signifies a tip, suggestion, or general note.
This icon indicates a warning or caution.
This book is here to help you get your job done. In general, if example code is offered with this book, you may use it in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.
We appreciate, but do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “Using WebPageTest by Rick Viscomi, Andy Davies, and Marcel Duran (O’Reilly). Copyright 2015 Rick Viscomi, Andy Davies and Marcel Duran, 978-1-491-90259-2.”
If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at firstname.lastname@example.org.
Technology professionals, software developers, web designers, and business and creative professionals use Safari Books Online as their primary resource for research, problem solving, learning, and certification training.
Members have access to thousands of books, training videos, and prepublication manuscripts in one fully searchable database from publishers like O’Reilly Media, Prentice Hall Professional, Addison-Wesley Professional, Microsoft Press, Sams, Que, Peachpit Press, Focal Press, Cisco Press, John Wiley & Sons, Syngress, Morgan Kaufmann, IBM Redbooks, Packt, Adobe Press, FT Press, Apress, Manning, New Riders, McGraw-Hill, Jones & Bartlett, Course Technology, and hundreds more. For more information about Safari Books Online, please visit us online.
Please address comments and questions concerning this book to the publisher:
We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at http://www.oreilly.com/catalog/0636920033592.do.
To comment or ask technical questions about this book, send email to email@example.com.
For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.
Find us on Facebook: http://facebook.com/oreilly
Follow us on Twitter: http://twitter.com/oreillymedia
Watch us on YouTube: http://www.youtube.com/oreillymedia
There are many people who helped, encouraged, and cajoled us during the long process of writing this book and we’re truly grateful for their support.
Chief amongst those is Pat Meenan, who answered our many questions and guided us as we dug into the fabulous tool he created.
Courtney Nash, Brian Anderson, Shiny Kalapurakkel, Gillian McGarvey at O’Reilly, and Gareth Hughes, Tony Quartarolo, Steve Souders and Tim Kadlec are a few of the others we also owe a debt to.
Writing a book takes time and eats into the other aspects of our lives, so perhaps the biggest thanks we owe is to Corinne, Rick’s fiancée, Ligia, Marcel’s wife, and Nicki, Andy’s wife.
Finally, we’d like to thank you, our readers, as we hope this book encourages you to use WebPageTest, host your own instances, integrate it into your daily development cycle and contribute back so that WebPageTest continues to be one of the best tools for analyzing the performance of web pages.