Allscreenshots
Sign inGet an API key
Blog

Engineering

There is no such thing as a loaded page

Allscreenshots9 min read

GitHub's home page fires its load event 0.7 seconds after the request starts. Take a screenshot at that moment and you get a navigation bar above an empty frame.

Wait for the network to go quiet and you do better. At 1.8 seconds the headline is on screen, caught halfway through its entrance animation: "Software still starts", with the words at different heights and the second line missing. The page a visitor sees arrives at 3.0 seconds.

Three frames from one load of github.com. At the load event, 0.7 seconds, only the navigation bar and an empty frame are drawn. At network idle, 1.8 seconds, the headline reads Software still starts with the words at different heights. At 3.0 seconds the full headline, the event badge and the mascot are visible.
One load of github.com on 17 November 2026, 1280 × 800. The frames are what the browser had drawn when each signal fired. Page content and trademarks belong to GitHub.

Every screenshot tool has to pick a moment to press the shutter, and browsers offer three signals for it: DOMContentLoaded, load and network idle. We wanted to know how often each one lines up with the picture a person would call finished, so we measured it.

What we measured

We loaded 25 popular home pages three times each in Chrome 156, driven by Playwright 1.65 on an Apple M4 Pro laptop over a home connection. They are the same 25 sites we used in our Kitesurf comparison. Each load got a fresh browser context with an empty cache, a 1280 × 800 viewport, and 20 seconds on the clock.

During those 20 seconds we recorded two things. The first was when each signal fired. The second was every frame the browser painted, taken from Chrome's screencast stream.

Afterwards we compared each frame with the last one of the run. We call the pixels settled from the first moment after which no later frame differs from the last frame by 0.5% of its pixels or more. That threshold is about the area of a 72-pixel square, so a blinking cursor does not count and a late hero image does.

Two sites did not give us their real page. nytimes.com answered with a notice that we had been blocked as a suspected robot, and ebay.com returned an error page on two of its three loads. We left both out, which leaves 23 sites and 69 loads. The numbers describe the first screen only; nothing below the fold was looked at.

Dot plot with one row for each of 23 sites, sorted by when the pixels stopped changing. Each row marks the median time of DOMContentLoaded, load, network idle and the last pixel change, on an axis from 0 to 20 seconds. Google and Wikipedia settle in about half a second. Network idle is missing from six rows and appears up to ten seconds after the pixels settled on others. Apple, TikTok, CNN, Walmart and Cloudflare never settle within 20 seconds.
Median of three loads per site. Hollow markers on the right mean the signal did not fire, or the pixels did not stop changing, within 20 seconds in at least two of the three loads.

DOMContentLoaded is about the document

DOMContentLoaded fires when the HTML has been parsed and deferred scripts have run. MDN is explicit that it does not wait for images, subframes or async scripts. It tells you the document tree exists. It says nothing about what has been drawn.

In our runs the frame on screen at DOMContentLoaded differed from the final frame in 67 of 69 loads. The median load still had 28% of its viewport left to change. Both exceptions were loads of google.com.

Nobody should be surprised by that. It is still the event many scripts wait for, because it is the first one that fires and waiting for it never hangs.

The load event stops counting too early

load fires when the document and the resources it depends on have been fetched: stylesheets, scripts, iframes and images, apart from images marked for lazy loading. It sounds like the answer. The catch is that the browser draws up the list of resources from the markup and whatever scripts have asked for so far. Anything a script requests afterwards is not on it.

A large share of a modern page is requested afterwards. The frame at load differed from the final frame in 50 of 66 loads, with a median of 11% of the viewport still to change. Only Google, Reddit and YouTube gave us their final frame at load in all three runs.

Four sites shown at the load event and again at 20 seconds. Bing at load has a search box on a grey gradient and later a forest photograph. The Guardian at load shows its front page and later a full-screen consent dialog. LinkedIn at load is blank and later shows its sign-in page. Apple at load shows one black tile with text and later a grid of product images.
Top row: the frame on screen when load fired. Bottom row: the same page load at 20 seconds. Captured 17 November 2026; page content and trademarks belong to the respective sites.

Bing fired load at 1.4 seconds with a search box on a grey gradient, and its background photograph arrived a second later. LinkedIn fired it at 0.5 seconds over a blank white viewport.

The Guardian is the opposite case. Most of its front page was drawn at load, and half a second later a consent dialog covered it. If you wanted the front page, load was the right moment and every later one was wrong.

The other 3 of the 69 loads were CNN, where load did not fire at all inside 20 seconds. The page made a median of 822 requests in that time and was still making them when we stopped. A script that waits for load on that page with a 20-second timeout gets nothing.

Network idle answers a different question

The third signal is not a browser event. Playwright defines networkidle as no network connections for at least 500 milliseconds, and Puppeteer has close relatives. The idea is reasonable: if nothing is being fetched, there is probably nothing left to draw.

It was the best of the three. When it fired, the frame was final in 34 of 50 loads. It has two ways of failing, and we saw plenty of both.

Some pages never go quiet

In 19 of the 69 loads the network never went idle within 20 seconds. Six sites did this on every run: Cloudflare, CNN, Reddit, Walmart, X and Yahoo.

Yahoo is the obvious kind. It made a median of 1,072 requests in 20 seconds, 913 of them after load.

X is the less obvious kind. It made 42 requests in total and its pixels settled at about 2 seconds, but requests kept going out until at least 12 seconds in. Reddit's pixels were settled in about one second while its last request went out after 11.

For a screenshot of those pages, network idle is a timeout with extra steps.

Quiet does not mean still

When the network did go idle, the frame was not final in 16 of 50 loads. Those came from six sites: Amazon, Apple, GitHub, Microsoft, Stack Overflow and TikTok.

GitHub is the cleanest example. By 1.8 seconds its network had been quiet for half a second, and the headline was still animating into place. An animation runs on the clock. It makes no requests, so nothing about the network can tell you it is still going.

The signal also only marks a pause in traffic. GitHub made more requests after going idle, the last of them close to six seconds in.

And when it works, you wait

In the 34 loads where network idle did give the final frame, it fired a median of 2.1 seconds after the pixels had stopped changing. LinkedIn was the extreme. Its sign-in page settled at 0.7 seconds and the network went idle at 10.2.

That is the price of the signal when it is right. On a batch of ten thousand captures, two seconds each is five and a half hours of browsers sitting in front of finished pages.

Some pages have no final frame

In 16 of the 69 loads the viewport was still changing when the 20 seconds ran out. Apple, Cloudflare, CNN and TikTok did it on every run.

TikTok plays video. Apple's and Cloudflare's home pages run animations that repeat, and our frame-by-frame differences for them rise and fall on a cycle of about five seconds for Apple and four for Cloudflare.

A page like that has no moment you can call loaded. Whatever you capture is one frame out of a loop, and a different run will give you a different frame. If your visual regression test flakes on a page with a carousel, this is very likely why.

For the 53 loads that did settle, the median was 1.9 seconds.

What we do with this

The Allscreenshots API takes a waitUntil option with the same three values, and the default is domcontentloaded, the earliest and least informative of them. We picked it because we do not use it to decide when to capture. It only tells the capture service that there is a document to inspect.

From there the service looks at the page itself. It waits for the images in the viewport to decode and for fonts to finish loading. It checks whether anything is still animating in, and waits for a short quiet period in the computed styles of what is on screen. Pages with a slider get a longer window, because their first slide usually fades in piece by piece. All of this runs inside a time budget, so a page that never stops moving is captured anyway.

We did not run our own API in this experiment. The numbers above describe the browser's signals, and we have not shown here that our checks beat them.

There are also things those checks cannot know. A page with a loop, like Apple's, has no finished state to find. And a page that draws its chart five seconds after everything else has gone still looks finished at second four. For that one, tell the API what to wait for:

bash
curl -X POST 'https://api.allscreenshots.com/v1/screenshots' \ -H 'X-API-Key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "url": "https://example.com/dashboard", "waitFor": ".chart-loaded" }' \ --output dashboard.webp

If you own the page, you don't need a heuristic

Everything above is guesswork about pages we cannot change. If the page is yours, skip the guessing. Have your application add a class or an attribute to the document when it has drawn what it means to draw, and wait for that selector.

It works the same way in plain Playwright:

javascript
await page.goto(url, { waitUntil: 'domcontentloaded' }); await page.waitForSelector('html[data-ready]'); await page.screenshot({ path: 'dashboard.png' });

Your application is the only thing that knows when it is done. Playwright's own documentation discourages networkidle for tests and recommends asserting on the page instead, for the same reason.

Limits of this experiment

This was 69 loads on one machine and one connection, on one day.

We only loaded home pages. Many of them are sign-in walls or consent screens, and an article page or a dashboard will behave differently. Sites also served the variant for the place we ran the test from, and consent dialogs differ by region.

The browser was headless Chrome. We removed the word "Headless" from the user agent and changed nothing else. Amazon, Booking.com and Stack Overflow answered with a 202 or 403 status and then showed their normal page.

Recording every frame costs CPU, so the absolute times are probably a little slower than they would be without it. And "never" in this post always means "not within 20 seconds".

The per-load results are available as JSON lines, with a summary and the run settings.

Find out how easy it is to capture and share pixel-perfect screenshots at scale using Allscreenshots. Sign up for a free account and start integrating your first screenshot API call today.

Start with one request

Free plan: 100 screenshots. No credit card.

Get an API key
  • Full-page captures
  • Popups and repeated sticky bars removed
  • Markdown, JSON and PDF output
  • Crawl a site from one URL
  • Desktop, tablet and phone in one image
  • Works in n8n, Make and Zapier
  • MCP server for AI assistants