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.

An empty page-source string does not identify one universal Headless Chrome problem. First confirm that the browser reached the intended URL, inspect the live DOM, and wait for the page content your script actually needs. JavaScript can populate a page after the document reaches a ready state, so navigation returning is not proof that the desired content exists. The steps below help distinguish a navigation problem, a timing problem, and a mismatch between the DOM and the source-reading method.

Start by checking what the browser loaded

Before changing Chrome flags or reinstalling a driver, collect three facts from the same browser session: the current URL, the document ready state, and the DOM. An empty result from one accessor is not enough to conclude that Chrome loaded a blank page.

  1. After navigation, record the browser’s current URL. Check that it is the expected destination rather than an error page, an unexpected redirect, or a page that has not finished navigating.
  2. Read document.readyState and inspect document.documentElement.outerHTML. If useful, inspect document.body.outerHTML as well.
  3. Compare those observations with the value returned by your source-reading method, such as Selenium’s page_source.

Chromium’s Headless documentation demonstrates evaluating document.body.outerHTML after the load event. That is an inspection of the current browser DOM, not necessarily a copy of the original response bytes. Chromium’s Headless README describes Headless Chromium as usable in a headless or server environment.

Wait for the page’s content, not just navigation

WebDriver navigation waits according to its configured page-load strategy. The default strategy, normal, waits for the document’s complete state; eager waits for interactive; and none does not block on page loading. These states describe document loading, not whether a JavaScript application has finished rendering the particular data your task needs.

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.
#1 Best Overall
Sale
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

Selenium explicitly warns that JavaScript can change a site after the document ready state, and that elements needed for interaction may not yet exist when the next command runs. Use an explicit wait for a meaningful element or application condition rather than assuming a fixed delay or treating complete as an application-ready signal. See Selenium’s waiting strategies and browser options and page-load strategies.

Python Selenium example

This example assumes Python, Selenium, and a working Chrome installation are available on the Unix machine. Replace the URL and CSS selector with the page and a selector that appears when the content you need is ready. It prints both Selenium’s page source and the browser’s current DOM snapshot so you can compare them.

from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait

url = "https://example.com"
ready_selector = "main"  # Replace with a selector for the required content

options = Options()
options.add_argument("--headless")

driver = webdriver.Chrome(options=options)
try:
    driver.get(url)
    WebDriverWait(driver, 20).until(
        lambda d: d.find_element(By.CSS_SELECTOR, ready_selector).is_displayed()
    )

    print("Current URL:", driver.current_url)
    print("Ready state:", driver.execute_script("return document.readyState"))
    print("Page source:")
    print(driver.page_source)
    print("DOM snapshot:")
    print(driver.execute_script("return document.documentElement.outerHTML"))
finally:
    driver.quit()

The wait above is an example, not a universal readiness test: a page may use a different selector, render the relevant data inside another element, or show a shell before its data arrives. Pick a condition tied to the result your script needs. If the selector does not appear before the timeout, the exception is useful evidence: investigate the URL, page behavior, selector, and browser session rather than simply increasing the timeout.

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

Choose a page-load strategy deliberately

If your code sets pageLoadStrategy, understand what it changes: when the navigation command returns. It does not add an application-specific wait. In particular, choosing eager or none can make your code responsible for explicitly waiting before reading content. Conversely, switching to normal alone will not ensure a JavaScript-rendered element is present.

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

When diagnosing an empty result, temporarily simplify the setup and use the normal navigation behavior with a targeted explicit wait. Once the result is reliable, optimize the strategy only if needed, preserving the separate wait for the required content.

Cross-check with Chrome’s serialized DOM

Chrome provides a command-line check that can help determine whether the browser’s serialized DOM contains content. Run it on the same Unix host, using the Chrome executable and destination relevant to your setup:

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.
google-chrome --headless --dump-dom "https://example.com"

Depending on the distribution, the Chrome executable may have a different name or path. Use the installed binary’s actual command. Chrome documents that --dump-dom prints the serialized DOM; it is not equivalent to fetching and printing the original HTML response with a tool such as curl. The browser can execute scripts and produce a DOM that differs from the initial response. See Chrome’s Headless mode and command-line tools documentation.

Interpret the comparison carefully:

  • If the command-line dump and WebDriver both show an empty or unexpected document, investigate whether the page loaded correctly and whether the target itself supplies or renders content in that context.
  • If the command-line dump contains the content but your WebDriver result does not, compare the URL, timing, browser context, and options used by each run.
  • If the DOM contains a page shell but not the desired data, wait for the relevant application state. A shell is not evidence that the data request or rendering has completed.
  • If the browser DOM has content but a source accessor appears empty, check that the accessor is being called on the intended driver and after navigation and waits have completed.

Check the Headless implementation and version

Older advice about Headless Chrome can be version-sensitive. The Chromium Headless README says that, as of milestone 132, the old Headless functionality is no longer part of the Chrome binary and that --headless=old has no effect. It directs users who specifically need the old Headless implementation to chrome-headless-shell. Verify the installed Chrome and driver versions and determine whether your setup intends to run current Chrome Headless or that separate shell; do not assume a legacy flag applies to current Chrome.

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

This documented transition is a reason to check the environment, not proof that it caused a particular empty page. Confirm the actual executable and versions used by the process producing the result, especially on Unix machines with multiple Chrome or Chromium installations. The version-specific details are in the Chromium Headless README.

Rank #4
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

Common symptoms and what to do next

Symptom Likely diagnostic direction Next check
Current URL is not the requested page Navigation did not end at the expected destination. Inspect the final URL and any navigation error before changing source-reading code.
Document is present, but application content is missing The app may still be rendering or awaiting its own data. Wait for a target-specific element or condition, then inspect the DOM again.
page_source is empty, but script evaluation returns DOM markup The observations differ by accessor or timing. Confirm both reads use the same driver and occur after the content wait; compare with --dump-dom.
Changing to eager or none makes the issue more frequent The navigation command returns earlier, without ensuring app content exists. Keep a separate explicit wait for the content required by the task.
An old Headless flag has no apparent effect The advice may target an older implementation. Verify Chrome’s version and whether the setup requires chrome-headless-shell.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If the goal is to obtain a screenshot or PDF rather than inspect or interact with the DOM, ScreenshotNeo provides a website screenshot API and MCP server. One GET request can return a PNG, JPEG, WebP, or PDF. This is an alternative capture workflow, not a way to debug Selenium’s page-source accessor or expose the page DOM.

For a screenshot, the cURL request below saves a WebP response; replace the target URL and provide your API key. The ScreenshotNeo documentation covers the API options.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

Python equivalent:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://example.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js equivalent:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://example.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

ScreenshotNeo removes known cookie and consent banners, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.

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

The free plan includes 1,000 screenshots per month without a card. Paid plans start at $5 for 3,000 screenshots; every feature is available on every plan. Sign up for ScreenshotNeo’s free plan.

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 comparison to isolate the failure

The useful distinction is what each diagnostic actually observes. Selenium’s page source is one WebDriver output; script evaluation reads the live DOM through the browser; Chrome’s --dump-dom emits a serialized DOM from a command-line run. They need not match because they may be taken at different times, in different contexts, or from different page states. A raw HTTP response is another observation again. Compare like with like before concluding that a particular component is broken.

There is no documented single cause or universal fix for an empty page-source result across Unix Headless Chrome environments. The supported diagnostic path is to verify the destination, inspect the browser DOM, wait for the page-specific content, account for the configured Selenium readiness strategy, cross-check with Chrome’s DOM dump, and confirm the actual Headless implementation and version.

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.

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