Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk6 min

How to Wait for a Website to Finish Loading Before a Browserless Screenshot

Set Browserless screenshot timing around the page condition that matters: navigation, a target selector, or network quiet. Includes REST, Puppeteer, Playwright, BQL, and troubleshooting.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose a clear readiness condition before calling screenshot(): for Browserless REST, set gotoOptions.waitUntil, then add a selector or function wait if the page renders its important content asynchronously. With a Browserless-connected Puppeteer or Playwright page, await the appropriate navigation or content condition before capturing. “Finished loading” is not one universal state; the right wait depends on what must be visible in the screenshot.

Choose the right definition of “ready”

Browserless REST’s gotoOptions.waitUntil follows Puppeteer navigation options. The navigation event tells the browser when to continue, but it does not necessarily prove that a particular piece of client-rendered content is ready.

As an Amazon Associate I earn from qualifying purchases.

Condition What it waits for Useful when
domcontentloaded The initial HTML has been parsed; it does not wait for stylesheets, images, or subframes. The required content is present in the initial document and you want to proceed without waiting for every dependent resource.
load The page load event, including dependent resources. The screenshot depends on resources such as images having completed loading.
networkidle0 Zero active network connections for at least 500 ms. The page makes requests to assemble content and then becomes quiet.
networkidle2 No more than two active network connections for at least 500 ms. The page has some continuing traffic that makes a strict zero-connection condition a poor fit.

These meanings and the 500 ms idle period are described in Browserless REST request configuration. Pages with polling, analytics, or long-lived requests may never satisfy strict network idle. In that case, use a target selector or function wait, or choose a less strict network condition rather than assuming the page is broken.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Browserless REST waits for navigation and page content

A REST screenshot request can specify navigation options and a separate precondition for the content that matters. For example, if the screenshot should include a visible main-content element, wait for that selector explicitly:

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
{
  "url": "https://example.com/",
  "gotoOptions": {
    "waitUntil": "networkidle2",
    "timeout": 30000
  },
  "waitForSelector": {
    "selector": "#main-content",
    "timeout": 10000,
    "visible": true
  }
}

Send this JSON as the body of a request to the Browserless REST screenshot endpoint you use, with the authentication and endpoint configuration for your account. The values above are examples, not universal settings: replace the URL and selector, and adjust timeouts to the target site. Browserless documents preconditions for REST requests including selector and function waits, as well as event and fixed-duration waits, in its timeout guidance.

Prefer a condition that proves the screenshot is useful

Pick an element that is both specific to the desired content and present only when that content is ready. A broad selector such as body may match before a client-rendered page has finished filling in. If readiness requires checking more than an element’s appearance, use a function wait that tests the relevant page state.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors

Set timeouts deliberately

Use a navigation timeout for navigation and a selector or function timeout for dynamic content. A fixed delay is appropriate when elapsed time is itself the condition—for example, allowing an animation to settle—but it can waste time or capture too early if used as a substitute for checking content. Browserless recommends handling timeout errors and choosing the wait type to match the operation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Decide consciously whether to accept a partial result

Browserless documents bestAttempt: true as an option for proceeding with the available page state after some asynchronous operation fails or times out. Use it only when a partial screenshot is acceptable and your application can recognize that outcome. It does not mean the page became ready, so do not treat the returned image as proof that the requested content loaded.

Rank #3
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

Wait before capturing with Puppeteer or Playwright

With a Browserless-connected browser, the sequence is: connect, create a page, await navigation, optionally await the target content, capture, then close the browser session. Browserless’s screenshot example demonstrates remote browser connections and screenshots; it uses networkidle2 with Puppeteer and networkidle with Playwright.

Puppeteer

const browser = await puppeteer.connect({ browserWSEndpoint: BROWSERLESS_WS_ENDPOINT });
try {
  const page = await browser.newPage();
  await page.goto('https://example.com/', {
    waitUntil: 'networkidle2',
    timeout: 30000,
  });
  await page.waitForSelector('#main-content', {
    visible: true,
    timeout: 10000,
  });
  await page.screenshot({ path: 'shot.png', fullPage: true });
} finally {
  await browser.close();
}

Set BROWSERLESS_WS_ENDPOINT to the WebSocket endpoint and credentials for your Browserless account, and install and import Puppeteer in your project. Replace the example URL, selector, and output settings with your own. If strict network quiet never occurs on the target, choose a different navigation condition and make the selector wait the decisive readiness check.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor | 100Hz, Game Mode, Advanced Eye Comfort, HDMI and D-sub Ports (LS27D366GANXZA)
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient

Playwright

const browser = await playwright.chromium.connectOverCDP(BROWSERLESS_WS_ENDPOINT);
try {
  const page = await browser.newPage();
  await page.goto('https://example.com/', {
    waitUntil: 'networkidle',
    timeout: 30000,
  });
  await page.locator('#main-content').waitFor({
    state: 'visible',
    timeout: 10000,
  });
  await page.screenshot({ path: 'shot.png', fullPage: true });
} finally {
  await browser.close();
}

Use the connection method and endpoint supported by your Browserless account and installed Playwright version. Playwright’s networkidle is not the same string as Puppeteer’s networkidle0 or networkidle2; use the documented option for the library you are calling.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a click that triggers navigation

Start waiting for navigation before clicking, so a fast navigation is not missed. Browserless’s BAP waiting guidance describes this ordering. If you can reliably identify the destination by a unique element instead, wait for that element as the post-click condition.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
const navigation = page.waitForNavigation({ waitUntil: 'networkidle2' });
await page.click('a.next-page');
await navigation;
await page.waitForSelector('#main-content', { visible: true });
await page.screenshot({ path: 'next-page.png' });
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

BrowserQL has separate network-idle and screenshot controls

In BrowserQL (BQL), use waitForNetworkIdle when network quiet is the condition you need, and use the screenshot mutation for capture settings. The network-idle mutation exposes idleTime, concurrency, and timeout; its defaults are 500 ms idle and zero tolerated in-flight requests. Increasing concurrency may help when long-polling or analytics requests prevent strict idleness. See the BQL wait-for-network-idle schema and BAP waiting guidance.

BQL screenshot options include fullPage, a CSS selector, timeout, and waitForImages. The screenshot timeout defaults to 30,000 ms, and waitForImages defaults to false, according to the BQL screenshot schema. These are capture controls, not substitutes for deciding when the page is ready. In particular, enabling image waiting does not establish that a dynamic application section has populated.

Troubleshoot screenshots that are early or time out

Symptom Likely cause What to change
Screenshot contains a shell, spinner, or empty content area Navigation completed before client-rendered content appeared. Add a selector or function wait for the actual content; do not rely on domcontentloaded alone.
Request times out while waiting for network idle Persistent polling, analytics, or other ongoing requests prevent the selected idle condition. Use a selector/function readiness check, choose a less strict condition, or, in BQL, adjust concurrency if appropriate.
Selector wait times out The selector is wrong, the element never appears, or it is not visible under the selected condition. Verify the selector against the page and wait for the state that matters; if a different content marker is more reliable, use it.
Images are absent or incomplete The chosen navigation event did not wait for all dependent resources, or the capture path does not wait for images. Consider load where resource completion matters; for BQL, check waitForImages, which defaults to false.
Click-driven screenshot shows the old page The capture began before the click-triggered navigation or destination content was observed. Register waitForNavigation before the click, or wait for a unique destination selector.
A best-attempt response is incomplete An asynchronous wait failed or timed out and the request continued with the available page state. Use bestAttempt only if partial output is acceptable; otherwise treat the timeout as a failed capture and fix the readiness condition.

Or skip the browser setup

ScreenshotNeo is a screenshot API and MCP server: one GET request with a URL returns a PNG, JPEG, WebP, or PDF. Its response headers identify the page verdict and billing status. Cookie banners are accepted and removed before capture, along with supported newsletter popups and chat widgets; those cleanup steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents and other MCP clients.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/ -o shot.webp

See the ScreenshotNeo API documentation for request options. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots. Sign up for ScreenshotNeo free.

Frequently Asked Questions

Does Browserless guarantee that network idle means every visual change is finished?

No. Network idleness describes active requests under a specified threshold; it does not prove that a specific component or animation has reached the state your screenshot needs.

Can I wait for an animation before taking the screenshot?

Yes. A fixed delay can suit a genuinely time-dependent visual change, but it is not a reliable substitute for a selector or function that proves required content is present.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.