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 Fix Screenshots of Websites That Require JavaScript to Render

A blank screenshot often means capture happened before JavaScript-rendered content was ready. Enable scripts, wait for a meaningful page condition, and account for frames, lazy loading, and rendering differences.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If a website screenshot is blank or missing content, make sure your capture runs in a JavaScript-enabled browser, then wait for the specific content you need—not just an arbitrary delay or a generic page-load event. For reliable results, capture only after a visible element, expected text, or application state confirms the page is ready.

Why a JavaScript website screenshot can be blank

A screenshot records what the browser has rendered at capture time. If a site builds its content with JavaScript, capturing before its scripts run—or before the relevant content appears—can produce a blank page, a loading shell, or an incomplete image. The goal is to wait for the useful rendered state, not merely for the initial document response.

As an Amazon Associate I earn from qualifying purchases.

First check that your automation actually uses a browser engine that executes JavaScript and that JavaScript has not been disabled in the page or browser context. Then navigate and wait for a condition tied to the content you want to capture.

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

Fix it with Puppeteer

Enable JavaScript before navigating

In Puppeteer, call page.setJavaScriptEnabled(true) before navigating to the target page. The setting change takes full effect on the next navigation; if you change it on a page that is already loaded, reload or navigate again. See the Puppeteer Page.setJavaScriptEnabled API.

#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

Wait for a page-specific readiness marker

Use a selector or condition that means the content you need is present. The selector in this example is illustrative: replace it with a real marker in the site you are capturing.

const puppeteer = require('puppeteer');

(async () => {
  const url = 'https://example.com';
  const browser = await puppeteer.launch();
  try {
    const page = await browser.newPage();
    await page.setJavaScriptEnabled(true);
    await page.goto(url, { waitUntil: 'domcontentloaded' });
    await page.waitForSelector('[data-page-ready="true"]', {
      visible: true,
      timeout: 30000,
    });
    await page.screenshot({ path: 'page.png', fullPage: true });
  } finally {
    await browser.close();
  }
})();

Replace https://example.com and [data-page-ready="true"] with the target URL and a selector the page actually exposes. Set the timeout to fit the site and your environment. Puppeteer’s screenshot guide shows navigation followed by Page.screenshot(); it also demonstrates networkidle2 as one possible navigation setting, not as a guarantee that every application is ready.

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

Use an application condition when a selector is not enough

If the page exposes no reliable readiness element, wait for a condition that represents the needed content. Puppeteer provides page.waitForFunction() for a page-specific JavaScript condition, as well as element and locator waits. For example, you might wait until an expected heading has non-empty text or an application-defined state becomes true. Choose a condition that actually distinguishes a finished view from its loading state.

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

Choose the right wait condition

Navigation events describe browser lifecycle milestones; they do not necessarily mean that a client-rendered application has finished displaying the content you need. Playwright documents commit, domcontentloaded, load, and networkidle as navigation signals, but discourages networkidle as a general test-readiness criterion. Its guidance is to rely on web assertions to assess readiness instead. See the Playwright Page API.

Rank #3
Sale
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 strategy What it tells you When it helps—and its limit
Selector becomes visible A chosen element is visible in the page. Useful when the element corresponds to the content you need. It can be misleading if the element appears before the rest of the view is ready.
Expected text or app state A page-specific condition has become true. Often a strong choice when the site exposes a meaningful marker. The condition must match the content or state you intend to capture.
domcontentloaded or load A general navigation milestone has occurred. Can be useful for navigation, but does not by itself establish that asynchronous application content has rendered.
networkidle Network activity has met a defined quiet-period condition. May be unsuitable for sites with polling, streaming, analytics, or other ongoing requests; network silence is not a universal definition of visual readiness.
Fixed delay A chosen amount of time has elapsed. Useful as a diagnostic fallback when no observable condition is available. It may be too short on a slow run and waste time on a fast one.

Puppeteer’s screenshot guide uses networkidle2 in an example navigation call. That can be useful in a particular workflow, but do not treat it—or any single generic event—as a universal fix for a blank screenshot. Prefer an observable signal associated with the target content.

Handle frames, scrolling, and interaction

Content inside an iframe

If the missing content belongs to an iframe, wait for the correct frame and then check for the target element or state inside that frame. A selector in the main document does not prove that asynchronously loaded frame content is ready. Puppeteer documents frame-related waits, including waitForFrame, and page-specific waits such as waitForFunction; see its Page API.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • 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

Lazy-loaded content and user-triggered states

Some pages load images or other content only after scrolling, clicking, or another interaction. Reproduce the trigger the site requires, then wait for the expected content before capturing. There is no single lazy-loading procedure that applies to every site; the page’s own behavior determines what must happen.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Make repeated screenshots comparable

For visual comparisons, keep the capture environment consistent: use the same browser version, operating system, headless or headful mode, and relevant rendering settings as the reference capture. Differences in host OS, browser version, settings, hardware, power source, and headless mode can affect rendering. Playwright also recommends taking screenshots in the same environment as the baseline; consult its visual comparisons guidance.

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.
  • Use the same viewport and device scale factor across runs.
  • Keep browser and operating-system versions aligned with the baseline when practical.
  • Use the same headless or headful mode and browser settings.
  • Wait for the same page-specific readiness condition each time.

Troubleshoot a blank or incomplete screenshot

Symptom Likely cause What to check or change
The screenshot is blank or shows only a shell. JavaScript is disabled, or capture happens before the application renders. Enable JavaScript before navigation, navigate again, and wait for a visible target or app-specific readiness condition.
The page loads, but a section is missing. The section loads asynchronously, lives in a frame, or needs scrolling or interaction. Wait for the relevant content within the correct frame, or reproduce the required scroll or interaction and verify the content before capture.
A network-idle wait hangs or times out. The site may keep requests active through polling, streaming, analytics, or similar behavior. Replace the generic network-idle wait with a selector, expected text, or application condition tied to the screenshot.
A fixed delay works sometimes but fails on other runs. The page’s render time varies. Use an observable readiness condition where possible. Treat a delay as a fallback, not proof that the target state has rendered.
Screenshots differ despite using the same URL. The browser or rendering environment may have changed, or the page reached a different state. Align browser version, operating system, mode, settings, viewport, and readiness condition with the reference capture.

Or skip the browser setup

For a one-call screenshot, ScreenshotNeo accepts a URL and returns a PNG, JPEG, WebP, or PDF. Its clean-shot options accept cookie or consent banners like a visitor and remove 60+ known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response indicates the page verdict and billing status in headers. ScreenshotNeo also has an MCP server with tools for AI agents, including Claude, Cursor, and other MCP clients.

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 documentation for request options and API details. Free accounts include 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots. Sign up for ScreenshotNeo’s free plan.

Frequently Asked Questions

Does a website screenshot service automatically execute JavaScript?

It depends on the service and its capture method. Check its documentation for browser rendering and page-readiness options; this article’s Puppeteer example explicitly uses a browser automation engine.

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

What if I cannot change the website to add a readiness marker?

Wait for an existing visible element, expected text, or other observable application condition that represents the content you need. If none is available, use a carefully chosen delay as a fallback and validate the resulting image.

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.

Leave a Reply

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

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair 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.