Using WebPageTest
by Rick Viscomi , Andy Davies , and Marcel Duran
Copyright 2016 Rick Viscomi, Andy Davies, and Marcel Duran. All rights reserved.
Printed in the United States of America.
Published by OReilly Media, Inc. , 1005 Gravenstein Highway North, Sebastopol, CA 95472.
OReilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://safaribooksonline.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com .
- Editors: Courtney Nash and Brian Anderson
- Production Editor: Shiny Kalapurakkel
- Copyeditor: Gillian McGarvey
- Proofreader: Eileen Cohen
- Indexer: Wendy Catalano
- Interior Designer: David Futato
- Cover Designer: Karen Montgomery
- Illustrator: Rebecca Demarest
- October 2015: First Edition
Revision History for the First Edition
- 2015-10-09: First Release
See http://oreilly.com/catalog/errata.csp?isbn=9781491902592 for release details.
The OReilly logo is a registered trademark of OReilly Media, Inc. Using WebPageTest, the cover image, and related trade dress are trademarks of OReilly Media, Inc.
While the publisher and the authors have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.
978-1-491-90259-2
[LSI]
Foreword
I have many tools in my web performance toolkit. Chrome DevTools is my goto for inbrowser performance analysis. I use the PageSpeed Insights and YSlow extensions for converting performance observations into actions. I love bookmarklets, especially for doing performance analysis in mobile browsers. The websites I run are monitored using several RUM and synthetic performance measurement services.
But I rely on WebPageTest more than all of these other tools combined. Why?
You can run WebPageTest from anywhere. It doesnt require installing anything, all you need is a browser. Ive frequently run an analysis of someones website in IE from China on my iPhone and shown them the results midconversation. Theyre amazed, and I have to swing the conversation from explaining how such a powerful analysis can be done so quickly on my phone to what they need to do to make their website faster.
WebPageTest makes it easy to save and share results. When analyzing performance, its often hard for one person to convey their experience to other team members. Sharing a WebPageTest URL ensures that everyone is looking at the same experience. This is especially helpful in bug reports. Since results are never deleted, its possible to go back to review performance problems in older browsers and previous versions of the website.
WebPageTest covers a wide range of performance metrics. It has waterfall charts with the associated request and response headers. It has timing metrics including time to first byte, document complete, and fully loaded. WebPageTest breaks down the number of requests and bytes by content type. Users who look deeper find the CPU utilization, bandwidth, and main thread timelines, which are often the key for uncovering the most critical performance fixes.
More than anything else, WebPageTest is constantly innovating in the space of web performance. Ten years ago everyone tracked window.onload as a reflection of how long it took for a user to start experiencing a website. And ten years ago that was a satisfactory approximation. But todays websites use AJAX, preloading, async loading, lazyloading, and other advanced techniques, which means we can no longer rely on window.onload to be an accurate reflection of what the user sees.
WebPageTest leads the way in finding new ways to measure and convey the user experience. This started with its focus on filmstrip views and side-by-side videos. Highlighting start render time lets website owners know how long users are waiting to get an indication that the website is even alive and able to respond to their requests. The most important innovation is the development of the Speed Index metric: one number that summarizes the overall rendering experience.
WebPageTest is the leading web performance tool in the world today. It is easy to use, provides the performance metrics that matter, and is pioneering new ways to measure the actual user experience that websites deliver. In 2009s Even Faster Web Sites, I wrote that WebPageTest hasnt gotten the wide adoption it deserves. Fortunately, thats no longer true. In fact, now theres even a book about it! Read on and find out how to get the most out of WebPageTest to help you deliver a web experience that is fast and enjoyable.
Steve Souders, Chief SpeedCurver at SpeedCurve, working on the interplay between performance and design - http://stevesouders.com
Preface
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. Im extremely grateful to OReilly, 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