ScreenshotNeo

BlogHow-to

How to take a full-page screenshot of a long webpage without memory errors

Capture long pages with Firefox, reduce screenshot size when needed, and diagnose browser memory use without assuming a universal page-height limit.

By the ScreenshotNeo team4 October 20267 min read

A full-page screenshot asks the browser to capture content beyond the visible viewport. For a long page, start with Firefox’s built-in full-page screenshot button or Web Console command. If the capture fails, try lowering the device-pixel ratio (DPR) or capturing only the relevant element; both reduce the requested image’s scale or scope, but Mozilla does not document them as guaranteed fixes for memory errors. There is no universal safe page-height or browser-memory threshold.

Use Firefox’s Developer Tools button for a point-and-click capture, or run :screenshot capture.png --fullpage in the Web Console. The command also supports a DPR, delay, and CSS selector. Then, if the issue persists, inspect browser memory in Chrome DevTools or narrow the capture to the portion you need.

1. Capture a full page in Firefox

Use the Developer Tools button

  1. Open Firefox Developer Tools.
  2. Open Developer Tools Settings.
  3. Under Available Toolbox Buttons, enable Take a screenshot of the entire page.
  4. Click the screenshot button. Firefox saves the resulting file to Downloads.

This is the simplest route when you want a one-off capture and do not need to set command options. Mozilla documents these steps in its Firefox screenshot documentation.

Use the Web Console command

Open Firefox’s Web Console and enter:

:screenshot capture.png --fullpage

The filename is optional. Firefox includes portions of the page outside the current viewport. The helper supports additional options:

Option What it changes When to use it
--dpr Device-pixel ratio used for the capture. Try a lower value if the full-resolution output is too large. This reduces output dimensions; it is a practical adjustment, not a documented guarantee against memory errors.
--delay Wait time before capture. Allow delayed content or animations to settle before taking the screenshot.
--selector Capture a CSS-selected element and its descendants. Use it when the article, report, or other content is inside a known container and you do not need the entire document.
Filename and clipboard/file controls Where the output goes and how it is handled. Use the documented helper options when you need a specific filename or clipboard behavior.

Check the Mozilla reference for the exact command syntax and available flags for your Firefox version. A selector can exclude unrelated page regions, but confirm it includes the content you need.

2. Reduce the capture’s size or scope

A long full-page image can have many pixels even if it looks simple on screen. A lower DPR reduces the number of output pixels per CSS pixel. A selector limits the capture to a particular element and its descendants. These are the most direct Firefox controls to try when a full-page capture is too demanding.

  1. Try a lower DPR. Change one setting at a time and check whether text and fine details remain readable.
  2. Capture a content element. Use --selector for the main article or report instead of the whole page when that meets your need.
  3. Use a delay for late content. If content loads after navigation, give the page time to settle before capture. A delay helps with timing; it does not reduce the page’s memory use.
  4. Reproduce on the affected browser and device. Browser and device capabilities vary, so a setting that works on one system may fail on another.

Mozilla documents the scale and scope controls, but does not publish a universal maximum page height, memory threshold, or setting that guarantees success. Chrome for Developers likewise notes that there are no hard numbers for excessive memory because devices and browsers differ (Chrome DevTools memory guide).

3. Diagnose memory use instead of guessing

A failed screenshot does not establish that screenshot generation caused the browser’s memory use. The page may already consume substantial memory, and a browser error may have a different cause. Inspect the page’s memory while reproducing the problem.

Check a point-in-time reading in Chrome Task Manager

  1. Open Chrome Task Manager with Shift+Esc, or use More tools > Task manager.
  2. Right-click a table header and enable the JavaScript memory column.
  3. Compare Memory footprint, which reflects operating-system memory, with JavaScript memory, which reflects the JS heap and includes a live value in parentheses.
  4. Observe the page before and during a reproduction of the capture attempt.

Record memory over time

In Chrome DevTools, open Performance, enable the Memory option, and record the relevant activity. A time series can show whether memory rises during page interaction or around the capture attempt.

Look for retained JavaScript objects

Use the DevTools Memory panel to take heap snapshots and compare them around the operation. A heap snapshot starts with garbage collection and shows reachable JavaScript objects. This can help identify objects that remain reachable, but it is not a direct measure of screenshot output size. See Chrome’s guides to memory problems and heap snapshots.

4. Troubleshooting

Symptom Possible cause What to try
The capture button is missing. The full-page screenshot toolbox button is not enabled. Open Developer Tools Settings and enable Take a screenshot of the entire page under Available Toolbox Buttons.
The command does not capture the whole page. The --fullpage option may be missing, or the command syntax may not match the installed Firefox version. Use :screenshot capture.png --fullpage and consult Mozilla’s current command reference.
The output is too large or capture runs out of memory. The requested full-page image has a large pixel area, or the browser/page is already using substantial memory. Try a lower --dpr or a narrower --selector. Treat these as reasonable adjustments, not guaranteed cures. Inspect memory while reproducing.
Some content is absent from the image. It may load after the capture begins, or the selector may omit it. Use --delay for late content, and verify that the selected element contains all required content.
The page appears to use a lot of memory before capture. Page scripts or other browser activity may account for the memory. Compare Task Manager readings and record a Performance trace. Use heap snapshots to investigate reachable JS objects; do not infer that capture is the cause from memory use alone.
A lower DPR makes text hard to read. The image has fewer output pixels. Raise DPR until the output is readable, or capture a smaller element at a higher DPR if that suits the task.

5. Performance, reliability, and file size

  • Pixel dimensions matter. Long pages create tall images; increasing DPR raises output dimensions and can make the capture more demanding. Lowering DPR is a tradeoff between output size and detail.
  • Limit scope when possible. Capturing the relevant content element avoids including unrelated page regions. Confirm the selector matches the desired content.
  • Timing is separate from memory. A delay can allow content to appear, but does not make the page smaller or guarantee that capture will succeed.
  • Expect device variation. Browser and operating-system memory capacity differs. There is no documented universal page-height limit or safe memory number for this workflow.
  • Keep diagnosis evidence-based. Monitor memory during a reproduction and distinguish OS footprint from the JS heap. A memory reading alone does not identify the cause of a failed capture.

6. Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. A single GET request can return a PNG, JPEG, WebP, or PDF. Here is a runnable cURL example for a full-page capture; see the ScreenshotNeo API documentation for request options and setup.

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

Replace YOUR_API_KEY with your API key and change the target URL as needed. The equivalent Python request is:

import requests

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

And in Node.js with a runtime that provides fetch:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
await require('node:fs/promises').writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));

ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before the shot. Bot checks, blank pages, and failed loads are never billed; response headers report the page verdict and billing status. Its MCP server lets AI agents use take_screenshot, get_page_info, and capture_pdf. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots. Every feature is on every plan. Sign up for 1,000 free screenshots a month, with no card required.

7. Frequently asked questions

Does Firefox publish a maximum full-page screenshot height?

The cited Firefox documentation does not specify a universal maximum height or memory threshold. Available memory and browser behavior vary by device.

Will lowering DPR always prevent memory errors?

No. It reduces output scale, but Mozilla does not document it as a guaranteed memory-error fix.

Does a high Task Manager reading prove the screenshot caused the problem?

No. It shows memory use, not its cause. Compare readings during reproduction and use Performance recordings or heap snapshots to investigate further.

Should I use a full-page capture if I only need the article?

Not necessarily. If the content is inside a known element, Firefox’s selector option can limit capture scope. Check that the element contains everything you need.