WebPageTest basics
Test a page from a real location, browser and connection with WebPageTest, then read its filmstrip, video, waterfall and connection view, and compare two tests.
- 01Set up a testChoose a location, a browser or phone, a connection profile and a number of runs, with a first view and a repeat view.
- 02Read what the visitor sawRead a filmstrip and its visual progress, and know what start render, visually complete and Speed Index measure.
- 03Find out whyRead each request's DNS, connect, TLS, wait and download in the waterfall, see the connections in the connection view, and compare two tests.
A test from someone else's phone
Asha opens the Leaf and Kettle store on her phone, on the bus to work. Her phone is cheap and slow. Her bus is far from your desk. What does her screen show, second by second, while the store loads?
You can't sit next to her and watch. In the last few lessons, you measured the store on your own laptop. You used the Performance panel, then Lighthouse. Both tell you about your laptop. Neither one films the screen of a phone in another city.
WebPageTest does. It's a testing tool that loads your page on a test machine: a real computer, in a place you choose, running a real browser. The machine films the screen while the page loads. It also times every file the page asks for. Then it shows you both.
A tea company wants to know how its shop in another city treats customers. So it hires a mystery shopper. The shopper goes there and buys tea like anyone else. They write down what they saw, and how long each step took. Next week, a second shopper does the same, so the two visits can be compared.
- In real life: Sending a shopper to a branch in another city
- In WebPageTest: Picking a test location
- In real life: Telling them to bring an old phone and take the bus
- In WebPageTest: Picking a device and a connection profile
- In real life: Photos of the counter, every few seconds
- In WebPageTest: The filmstrip
- In real life: A receipt with the time of each step
- In WebPageTest: The waterfall
The program on each test machine is WebPageTest's agent. Its code is open source, so anyone can run it. The course ran the agent on its own laptop and pointed it at the store's published copy. The agent loaded the store as a phone would. It loaded it twice in a row: a first visit, then a second one. Here is how long the screen stayed white:
// What the agent measured on the phone, in ms.// Each view is the middle run of three, as WebPageTest picks it.const firstView = { startRender: 2836, speedIndex: 3292, loadTime: 3545 };const repeatView = { startRender: 3078, speedIndex: 3524, loadTime: 3731 }; console.log(`First visit: blank for ${firstView.startRender} ms.`);console.log(`Second visit: blank for ${repeatView.startRender} ms.`);- Lines 1 and 2 are comments. A millisecond (ms) is a thousandth of a second. The agent ran the test three times. Line 2 says which run the numbers come from.
- Line 3 holds the first visit. Start render is the moment the screen first changed. Speed Index and load time come later in this lesson.
- Line 4 holds the second visit, on the same phone, right after the first.
- Lines 6 and 7 print
First visit: blank for 2836 ms.andSecond visit: blank for 3078 ms.
Here are both visits, laid out the way WebPageTest's filmstrip page lays them out: one column every half second.
Two things look wrong. Asha stared at a white screen for almost three seconds. And her second visit was no faster, even though her phone had kept the files from the first. Why? This lesson answers both questions with WebPageTest's views: the filmstrip, the waterfall, the connection view, and a comparison of two tests.
WebPageTest loads your page in a real browser, in a place, on a device and on a network you choose. It films the screen and times every request. The filmstrip shows what the visitor saw. The waterfall shows why.
Locations, browsers, and connection profiles
Before WebPageTest can load a page, it needs four answers from you. Its Quick Start Guide asks for them in this order:
- The page: the address to test.
- The location: where the test machine is.
- The browser: which browser, or which phone, loads the page.
- The connection: how fast the machine's network should be.
Where the test runs
WebPageTest "has test machines that are physically located around the world". Its guide says to test "from a location that is close to where your users are visiting from". Distance matters. Looking up an address, connecting and setting up encryption each wait for messages to cross the network and come back. You met those steps in The navigation timeline. From far away, every one of them takes longer.
The course's test machine was its own laptop. That's allowed. WebPageTest's code "is available for installation and running of private instances". Its test machines can run Windows, Linux or macOS. On webpagetest.org itself, you pick a machine from its list of locations.
Which browser, or which phone
Different locations offer different browsers. The guide recommends "using Chrome for initial testing because it has the most information reported". For phones, WebPageTest can emulate one. A desktop Chrome pretends to be the phone: it takes the phone's screen size, and runs on a slower processor. That's the device mode built into Chrome's DevTools.
WebPageTest keeps a list of phones to emulate. The course picked the first one, the "Motorola G Power". Its screen is 412 pixels wide and 767 tall, and its processor is slowed 7.5 times.
How fast the network is
A connection profile is a named network speed. The test machine slows its own connection down to match it. That's called traffic shaping. Picking a profile is like telling the mystery shopper to take the bus, not a taxi. Each profile sets three main numbers:
- the download speed;
- the upload speed;
- the round-trip time: how long a message takes to get to the server and back.
Read this table across. Each row is one profile from WebPageTest's settings file:
| Profile | Download | Upload | Added round trip |
|---|---|---|---|
| Cable (5/1 Mbps 28ms RTT) | 5 Mbps. | 1 Mbps. | 28 ms. |
| DSL (1.5 Mbps/384 Kbps 50ms RTT) | 1.5 Mbps. | 384 kbps. | 50 ms. |
| 3G (1.6 Mbps/768 Kbps 300ms RTT) | 1.6 Mbps. | 768 kbps. | 300 ms. |
| 4G (9 Mbps, 170ms RTT) | 9 Mbps. | 9 Mbps. | 170 ms. |
| LTE (12 Mbps, 70ms RTT) | 12 Mbps. | 12 Mbps. | 70 ms. |
| Native Connection (No Traffic Shaping) | Not changed. | Not changed. | Not changed. |
The last row is different. Native adds nothing. The test uses the machine's own connection, as it is.
To shape traffic, the agent changes the computer's network settings. So it needs administrator rights, its install guide says. Without them, you start it with --shaper none, and every test runs on the native connection.
The course's test
The agent reads a test from a small JSON file, written in its own option names. Here is the course's, shortened:
{ "url": "https://completefrontend.com/web-performance-recordings/project-slow-store/before/page", "runs": 3, "fvonly": 0, "mobile": 1, "width": 412, "height": 767, "dpr": 1.75, "throttle_cpu": 7.5}- Line 2 is the page to test: the store's published copy.
- Line 3 asks for three runs. A run is one go at the test, from a fresh start.
- Line 4 turns on a second visit in each run, the repeat view. The next section explains it.
- Lines 5 to 8 are the phone.
mobileturns emulation on.widthandheightare the screen.dprsays how many screen pixels make one CSS pixel. - Line 9 slows the processor 7.5 times.
The course started the agent with this command:
python wptagent.py --testspec before.json --shaper none--testspec names the test file. --shaper none turns traffic shaping off. So the test used the Native profile: the laptop's own internet connection, to the real store on completefrontend.com.
Slower on a faster computer
One number changed on the way. Before testing, the agent times a small job on the computer: it hashes the same data 106,000 times. Its code says that "takes ~1 second on the reference machine". On a faster computer, the agent slows the processor more, up to twice as much. The course's laptop was fast enough for the full doubling. So Chrome ran 15 times slower, not 7.5.
Why it matters: a slowdown multiplies whatever the computer can do. You saw that in Throttling and simulation. So the agent adjusts the rate to the machine it runs on.
How the course recorded it
- WebPageTest's agent, version 250303.095116, from its code at commit
560e4d5. - Chrome for Testing 157.0.8103.52, in its headless mode: the full browser, without a window.
- The Motorola G Power from WebPageTest's list, with its processor slowed 15 times.
- The laptop's own connection, with no traffic shaping. The store's files came over the internet.
- Three runs, each with a first view and a repeat view.
- The agent's DevTools video mode: its frames are Chrome's own screenshots of the page.
To run tests on webpagetest.org's own machines from your code, create an account there and get an API key. Its docs say: "WebPageTest requires an API key to submit any test using the API."
First view and repeat view
A visitor's first visit and their second are different. On the first, the browser has nothing saved. On the second, it may still have the page's files from last time. They wait in its HTTP cache, the store of files a browser keeps to use again.
WebPageTest tests both. Each run has two parts:
- The first view loads the page with an empty browser profile: no cache, no cookies.
- The repeat view starts the browser again with the same profile, and loads the page a second time. Whatever the first view saved is still there.
The option fvonly means "first view only". Set to 1, it skips the repeat view. The course set it to 0. WebPageTest's FAQ counts each view as its own page load. So three runs with repeat views are six loads.
Which run you see
Three runs give three sets of numbers. WebPageTest's summary page shows one of them, the median run. Sort the runs by load time, and take the middle one. Each view picks its own. Here is that rule, from WebPageTest's code, on the store's three first views:
// The three first views' load times, run 1 to run 3, in ms.const loadTimes = [3532, 3545, 3573]; const order = [0, 1, 2].sort((a, b) => loadTimes[a] - loadTimes[b]);const middle = order[Math.floor((loadTimes.length + 1) / 2) - 1];console.log(`Run ${middle + 1} is the median run.`);- Line 2 holds the three first views' load times. Load time is "the time from the start of the initial navigation until the beginning of the window load event", in WebPageTest's words.
- Line 4 sorts the run numbers by their load times.
- Line 5 takes the middle one. With three runs, that's the second in the sorted list.
- Line 6 prints
Run 2 is the median run.
That's why the overview's first visit came from run 2. The repeat views picked run 3. An average of three runs would have no filmstrip of its own. A real run has one, and a waterfall to match.
Why the second visit wasn't faster
Back to the second puzzle. The repeat view's screen stayed white for 3,078 ms. The first view's stayed white for 2,836 ms. The load time was 3,731 ms, against 3,545 ms. So the saved files bought Asha nothing. The agent's record of each request shows why.
In the repeat view, the browser still asked the server for every file. Each answer had the status 304 Not Modified. It means "the copy you saved is still good, use it". That answer is tiny, but it still had to cross the network. The store's server tells browsers to check every file before reusing it. So a saved copy never saves the trip.
You saved the bus timetable last week. Before you trust it, you always phone the bus company to ask if it has changed. The answer is short: "No, it's the same." But each time, you still waited on the phone.
- In real life: The timetable you saved
- In WebPageTest: The copy in the browser's HTTP cache
- In real life: Phoning to ask if it changed
- In WebPageTest: The browser asking the server about its copy
- In real life: "No, it's the same"
- In WebPageTest:
304 Not Modified - In real life: Never trusting it without a call
- In WebPageTest: The server's rule: check every file before reusing it
The second reason is in the waterfall, two sections from now. The white screen wasn't about downloading at all.
Why it matters: a repeat view shows what your caching rules give a returning visitor. WebPageTest's guide says good caching "can significantly improve the performance of a repeat view visit (up to 80+% depending on the page)". For this store, it gave nothing. If your repeat view looks like your first view, check how long your server lets browsers keep each file.
Filmstrips and videos
While the page loads, the agent records what the screen shows. WebPageTest calls these pictures the video frames. By default, it captures 10 frames a second. The course's agent kept one picture for each change, from Chrome's own screenshots.
A camera across the street takes a photo of the tea shop every tenth of a second as it opens. Laid side by side, the photos show the shutters going up, then the lights, then the full shelves. Played quickly, they become a short film of the opening.
- In real life: One photo
- In WebPageTest: One video frame
- In real life: The photos laid side by side
- In WebPageTest: The filmstrip
- In real life: The photos played in order
- In WebPageTest: The video
- In real life: How full the shelves look
- In WebPageTest: Visual progress
WebPageTest shows the frames in two ways:
- The filmstrip lays them side by side, one column per step of time. Each column shows the last frame at or before that moment. Its code uses 100 ms steps, or 500 ms steps when the fastest test took over three seconds. That's why the overview's picture had half-second columns.
- The video plays the same frames in time, like a film of the page loading. The agent can also turn them into a video file, with its
renderVideooption.
On the filmstrip page, a frame that changed gets a yellow border. The frame where the largest picture or block of text appeared, the LCP, can get a red one. The guide adds one more thing. Under the filmstrips, a waterfall has "a red overlay line that syncs its timing" with the frames above.
How full is the screen?
The agent gives each frame a visual progress: how close it is to the last frame, from 0 to 100%. It doesn't compare pixels one by one. A banner that pushes everything down would change every pixel. Instead, it counts how many pixels have each shade of red, green and blue. That count is a colour histogram. The agent leaves out white pixels. Then it compares each frame's counts with the first frame's and the last frame's.
Three measures come from those numbers:
- Start render: the first frame that changed. Before it, the visitor saw a white screen.
- Visually complete: the first frame at 100%.
- Speed Index: "the average time at which visible parts of the page are displayed", in WebPageTest's words. Lower is better.
Speed Index adds up how much of the page was still missing, moment by moment. Here is the agent's own sum, on the store's first view:
// The first view's frames: [time in ms, percent complete].const frames = [[0, 0], [2836, 70], [3505, 74], [4486, 100]]; let speedIndex = 0;for (let i = 1; i < frames.length; i++) { const [time] = frames[i]; const [lastTime, lastProgress] = frames[i - 1]; speedIndex += (time - lastTime) * (100 - lastProgress) / 100;}console.log(Math.round(speedIndex));- Line 2 holds the agent's four frames. A white screen at 0 ms, 70% at 2,836 ms, 74% at 3,505 ms, and 100% at 4,486 ms.
- Lines 5 to 9 walk through the gaps between frames.
- Line 8 multiplies each gap by the share of the page still missing during it.
- The first gap is 2,836 ms with everything missing, so it counts in full. The next two count for 30%, then 26%.
- Line 10 prints
3292, the same Speed Index the agent reported.
Why it matters: start render says when something appeared. Speed Index also says how fast the rest came. Two pages with the same start render can have very different Speed Indexes. It depends on the screen size too. So only compare tests on the same device.
Scrub through the recorded frames yourself. Pick a test and a view, then drag the time:
// The frame on screen at a moment: the last one at or before it.
function frameAt(frames, ms) {
return frames.findLast((frame) => frame.time <= ms);
}
- Visual progress
- 0%
- Start render
- 2,836 ms, still to come
- Largest Contentful Paint
- 2,866 ms, still to come
- Visually complete
- 4,486 ms, still to come
- Speed Index
- 3,292
Nothing of the page is on screen yet. Start render, the first change, comes at 2,836 ms.
Try the store's first view at 3.0 s, then at 4.0 s. The list of teas appears in between, yet the visual progress moves only a little. Most of the screen was already there.
The waterfall and the connection view
The filmstrip shows what happened. The waterfall helps show why. It has one row for each request, in the order they started. Each row is a bar from the request's start to its end, split into parts. You met the parts in The navigation timeline, as a phone call: look up the number, dial, agree on a private code, then talk.
- DNS: looking up the server's address from its name.
- Connect: opening a TCP connection to that address.
- TLS: agreeing on encryption. WebPageTest labels this part "ssl", its older name.
- Wait: from sending the request to the first byte of the answer.
- Download: from the first byte to the last.
In WebPageTest's waterfall, the first three are thin bars: teal for DNS, orange for connect, and magenta for TLS. The request itself is a thick bar in the file's colour. It's lighter while it waits, and full colour while it downloads. HTML is blue, JavaScript orange, CSS green, and images purple.
Here is the store page's own row, from the first view. The agent wrote down when each part ended:
// The store page's request in the first view, in ms from the start.const page = { dnsStart: 0, dnsEnd: 145, connectEnd: 248, tlsEnd: 299, sent: 300, firstByte: 323 }; console.log(`DNS: ${page.dnsEnd - page.dnsStart} ms`);console.log(`Connect: ${page.connectEnd - page.dnsEnd} ms`);console.log(`TLS: ${page.tlsEnd - page.connectEnd} ms`);console.log(`Wait: ${page.firstByte - page.sent} ms`);- Line 2 holds six times from the agent's record, in ms from the start of the test. Each part of the set-up starts where the one before it ends.
- Lines 4 to 6 subtract to get the connection's three parts. They print
DNS: 145 ms,Connect: 103 msandTLS: 51 ms. - Line 7 is the wait for the server. It prints
Wait: 23 ms.
So the browser spent 299 ms opening a line to the server. The server answered in 23 ms. The page is only 285 bytes once compressed, and its download shows as 0 ms.
The page's three files came next. They reused the page's connection, so they had no DNS, connect or TLS of their own. The last byte of the last file, the photo, arrived at 506 ms.
Now put the waterfall next to the filmstrip. Every file was in by about half a second. The screen stayed white until 2,836 ms. So more than two seconds of the wait came after the network part was over. That time went on the phone itself: Chrome turning those files into a page, on a processor slowed 15 times. The Performance panel shows that kind of work, task by task.
Why it matters: a waterfall shows the network, not the screen. Read it with the filmstrip. When the bars end long before the screen changes, a faster server won't help much.
The store's page also asks for a chat widget from chat.example, an address made up for the course. That request fails, and it isn't in the agent's list. Pick a row to take it apart:
// Each part of a request, from the agent's times.
const parts = {
dns: request.dns_end - request.dns_start,
connect: request.connect_end - request.connect_start,
tls: request.ssl_end - request.ssl_start,
wait: request.ttfb_end - request.ttfb_start,
download: request.download_end - request.download_start,
};- DNS
145 msLooking up the server's address from its name. - Connect
103 msOpening a TCP connection to that address. - TLS
51 msAgreeing on encryption over the new connection. - Wait
23 msFrom sending the request to the first byte of the answer. - Download
0 msFrom the first byte of the answer to the last.
It opened connection 1 first: 299 ms of set-up before it could even ask. Then the server answered.
The connection view
WebPageTest draws the same requests a second way. The connection view has one row per connection instead of one per request. Each row is labelled with its number and the server's name. It shows every request that used that connection.
A supermarket manager can list every shopper who paid. Or she can list the open checkout lanes, and who went through each one. The second list shows how many lanes she had to open, and how busy each lane was.
- In real life: The list of shoppers
- In WebPageTest: The waterfall: one row per request
- In real life: The list of lanes
- In WebPageTest: The connection view: one row per connection
- In real life: Opening a new lane
- In WebPageTest: DNS, connect and TLS for a new connection
- In real life: Shoppers sharing a lane
- In WebPageTest: Requests reusing one connection
The store's first view used two connections:
- Connection 1 spoke HTTP/2. It carried the page, styles.css, app.js and hero.svg. It paid for DNS, connect and TLS once.
- Connection 2 spoke HTTP/3. It carried one request, the site's icon, favicon.ico, at 3,525 ms. That was three seconds after the store's own files.
The server's first answer carried an alt-svc header: a note that the same server also speaks HTTP/3. The icon's connection, opened later, spoke HTTP/3.
Why it matters: every new connection costs a DNS lookup, a connect and a TLS set-up. Here, that was about 300 ms. The connection view shows how many you paid for. Files from several servers mean several rows, and several of those costs.
Comparing two tests
One test tells you how a page loads. Two tests tell you whether a change helped. In the course's final project, Project: fix a slow store, the store's first fix changes two things:
app.jsgetsdefer, so the browser doesn't stop reading the page to run it.- The photo,
hero.svg, becomes a much lighter drawing: 2.8 KB instead of 580 KB.
The course published both copies. It ran the same test on the fixed one: same phone, same connection, three runs. Keeping everything else the same is what makes two tests comparable.
To see which of two runners is faster, film them on the same track, at the same time, with one camera. Pause the film at any moment, and you can see who is ahead, and by how much. Films from different tracks on different days tell you much less.
- In real life: The same track and the same camera
- In WebPageTest: The same location, device, connection and runs
- In real life: The two runners, one above the other
- In WebPageTest: Two filmstrips, one row each
- In real life: Pausing the film
- In WebPageTest: Reading one column of the filmstrips
- In real life: Different tracks on different days
- In WebPageTest: Tests with different settings
WebPageTest compares tests on its filmstrip page. Each test is one row, and you can pick which run and view each row shows. Here are the two first views, each its median run:
The fixed store showed its header and photo at 0.7 s, two seconds sooner. Here are the main numbers, from the agent:
// The two tests' first views (median runs), in ms.const before = { startRender: 2836, lcp: 2866, speedIndex: 3292 };const after = { startRender: 690, lcp: 705, speedIndex: 1284 }; for (const name of Object.keys(before)) { console.log(`${name}: ${before[name]} ms, then ${after[name]} ms`);}- Lines 2 and 3 hold three of each test's numbers, from the median runs.
lcpis Largest Contentful Paint: when the biggest image or block of text appeared. Here, in both tests, that was the photo. - Lines 5 to 7 print one line per number:
startRender: 2836 ms, then 690 ms,lcp: 2866 ms, then 705 msandspeedIndex: 3292 ms, then 1284 ms.
Read the columns too, not only the numbers. In the comparison, both rows end with the same change: the promotion arrives and pushes the page down. The fix didn't touch it. So the numbers answer "did it help?", and the frames show what still needs fixing.
Why it matters: compare tests with the same settings, and compare frames as well as numbers. A comparison also shows what a change did not fix.
Which view answers it?
Each of WebPageTest's views answers its own question. Read this table across: a view, what it shows, and what to ask it.
| View | What it shows | The question it answers |
|---|---|---|
| The filmstrip | Pictures of the screen, one column per step of time. | What did the visitor see, and when? |
| The video | The same pictures, played in time. | How did the load feel to watch? |
| Visual progress | How close each picture is to the last one, from 0 to 100%. | How fast did the page fill in? |
| The waterfall | One row per request, with its DNS, connect, TLS, wait and download. | Which file was slow, and in which part? |
| The connection view | One row per connection, with the requests it carried. | How many connections did the page open, and what used each one? |
| Compare | Two or more tests' filmstrips, one above the other. | Did my change help, and at which moment? |
Now sort these questions by the view that answers them:
- What was on Asha's screen two seconds in?
- When did the photo of mint tea first appear?
- How long did the lookup of the store's address take?
- Which file finished downloading last?
- How many connections did the page open?
- Which files shared the first connection?
- Does a returning visitor download the photo again?
- How much do the store's caching rules save on a second visit?
Sort each question by the WebPageTest view that answers it.
Common mix-ups
- "A repeat view is always faster." No. It's only as fast as your caching rules allow. The store's repeat view checked every file again, and wasn't faster.
- "Speed Index is the moment the page finished." No. It's the average time at which visible parts of the page appeared. Visually complete is the moment it finished.
- "The waterfall shows everything that made the page slow." No. It shows the network. The store's files were all in by half a second, but the screen stayed white until almost three.
- "Native means a slow mobile network." No. Native adds no shaping at all. It's the test machine's own connection.
- "One run is enough." No. One run can be lucky or unlucky. WebPageTest runs several and shows the median, the middle one by load time. Noise and variability explains why runs differ.
- "WebPageTest tests from your own computer." No. It tests from its test machines, in the location you pick. You can run the agent yourself, but then your computer is the location.
Practice exercises
Answer first, then use the hints.
This is the fixed store's page row, from its median first view. What does the TLS line print?
// The fixed store's page request in the first view, in ms from the start.
const page = { dnsStart: 1, dnsEnd: 126, connectEnd: 146, tlsEnd: 173, sent: 173, firstByte: 196 };
console.log(`DNS: ${page.dnsEnd - page.dnsStart} ms`);
console.log(`Connect: ${page.connectEnd - page.dnsEnd} ms`);
console.log(`TLS: ${page.tlsEnd - page.connectEnd} ms`);
console.log(`Wait: ${page.firstByte - page.sent} ms`);TLS: 27 ms. The fixed store's page set up its connection the same way: DNS, then connect, then TLS, then the request.
These are the fixed store's three first views. Which run does WebPageTest show? What does the program print?
// The fixed store's first views, run 1 to run 3, in ms.
const loadTimes = [2229, 1342, 1659];
const order = [0, 1, 2].sort((a, b) => loadTimes[a] - loadTimes[b]);
const middle = order[Math.floor((loadTimes.length + 1) / 2) - 1];
console.log(`Run ${middle + 1} is the median run.`);Run 3 is the median run. Sorted, the load times are 1342, 1659 and 2229. The middle one is run 3's.
In the filmstrip playground, pick After the fix: first view and move to 1.0 s. What visual progress does it show?
61%. The frame from 690 ms shows the header and the photo, but not the rest of the page yet.
In the waterfall playground, pick app.js. How long did it wait for its first byte, in ms?
29 ms, from sending the request to the first byte. It shared the page's connection, so it had no set-up of its own.
Open the store's published copy in Chrome, with DevTools' Network panel open. Click hero.svg. Which response header tells the browser to check with the server before reusing its saved copy?
cache-control: public, max-age=0, must-revalidate. max-age=0 means a saved copy is stale at once, and must-revalidate means the browser must check with the server before using it. That's why every file in the repeat view came back as 304.
WebPageTest's file of connection profiles lists more than this lesson's table. Which profile adds a 4 ms round trip?
FIOS: "FIOS (20/5 Mbps 4ms RTT)", a fast fibre line.
Check your understanding
For each question, ask which view would show the answer: the filmstrip, the waterfall, or the connection view.
Question 1 of 7What does the Speed Index example print?
Read the code, then predict// The first view's frames: [time in ms, percent complete]. const frames = [[0, 0], [2836, 70], [3505, 74], [4486, 100]]; let speedIndex = 0; for (let i = 1; i < frames.length; i++) { const [time] = frames[i]; const [lastTime, lastProgress] = frames[i - 1]; speedIndex += (time - lastTime) * (100 - lastProgress) / 100; } console.log(Math.round(speedIndex));Choose an answer to see the explanation.
Question 2 of 7What is a repeat view?
Choose an answer to see the explanation.
Question 3 of 7The agent ran with --shaper none. Which WebPageTest connection profile does that match?
Choose an answer to see the explanation.
Question 4 of 7A test has three runs. Which run's numbers does WebPageTest's summary page show?
Choose an answer to see the explanation.
Question 5 of 7In the recorded first view, every file had arrived long before the screen showed anything. What does that tell you?
Choose an answer to see the explanation.
Question 6 of 7Why wasn't the recorded store's repeat view faster than its first view?
Choose an answer to see the explanation.
Question 7 of 7What does the connection view show that the waterfall doesn't?
Choose an answer to see the explanation.
Key takeaways
- WebPageTest loads your page on a test machine, in a location, browser and connection you choose, and films it.
- A connection profile shapes the machine's own network. Native leaves it as it is.
- Each run has a first view with an empty cache and, if you ask, a repeat view with what the first view saved. WebPageTest shows the median run.
- The filmstrip shows the screen at each step. Start render, visually complete and Speed Index come from its frames.
- The waterfall splits each request into DNS, connect, TLS, wait and download. The connection view shows which requests shared each connection.
- Compare tests with the same settings, and compare frames as well as numbers.
Remember the one-liner.
WebPageTest films a real load from a place you pick: the filmstrip shows what visitors saw, and the waterfall shows why.
Sources
The facts on this page come from these docs and source files:
- Quick Start Guide, WebPageTest docs.
- WebPageTest FAQs, WebPageTest docs.
- API Keys, WebPageTest docs.
- Private Instances, WebPageTest docs.
- connectivity.ini.sample: the connection profiles, WebPageTest source.
- mobile_devices.ini: the phones it emulates, WebPageTest source.
- JSON test options, WebPageTest agent docs.
- wptagent.py: the agent's command line, WebPageTest agent source.
- Installing the agent, WebPageTest agent docs.
- webpagetest.py: the CPU benchmark, WebPageTest agent source.
- page_data.inc: GetMedianRun, WebPageTest source.
- Metrics, WebPageTest docs.
- Page-level Metrics, WebPageTest docs.
- Speed Index, WebPageTest docs.
- visualmetrics.py: colour histograms and visual progress, WebPageTest agent source.
- process_test.py: start render, visually complete and Speed Index, WebPageTest agent source.
- filmstrip.inc.php: the filmstrip's columns, WebPageTest source.
- compare.php: changed frames and the LCP frame, WebPageTest source.
- Request-level metrics, WebPageTest docs.
- waterfall.inc: rows, bars and connection rows, WebPageTest source.
- contentColors.inc: the waterfall's colours, WebPageTest source.
Coming next: WebPageTest in depth. Script tests with several steps, block requests, find single points of failure, and try a fix before you build it.