Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →For the size of a web page in Puppeteer, call await page.setViewport({ width: 1080, height: 1024 }) before navigation. The values are CSS pixels and control layout, media queries, and screenshots. “Screen size” can also mean mobile emulation, the browser content area, the outer window, or a simulated headless display; each requires a different control.
Set a page viewport—the usual meaning
Create a page, set its viewport, and then navigate. Setting it before goto() avoids a first render at the wrong dimensions and makes responsive behavior deterministic.
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setViewport({
width: 1080,
height: 1024,
deviceScaleFactor: 1,
});
await page.goto('https://example.com', { waitUntil: 'networkidle2' });
await page.screenshot({ path: 'example.png', fullPage: true });
await browser.close();
})();
width and height are required CSS-pixel dimensions. deviceScaleFactor controls the emulated pixel density and defaults to 1. The optional hasTouch, isLandscape, and isMobile flags default to false.
Choose dimensions for the test
The 1080 by 1024 values above are the dimensions used in Puppeteer’s getting-started example, not a mandatory standard or an ideal breakpoint. Use the width and height your application must support—for example, a narrow phone layout, a tablet breakpoint, or a desktop regression size.
#1 Best Overall
- 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
Reset the viewport
Call await page.setViewport(null) to remove the page’s explicit viewport constraint and return to the default behavior. Each page can have its own viewport, so changing one page does not resize every page in the browser.
Mobile size is more than width and height
A mobile test often needs a mobile user agent, touch support, device scale, and mobile viewport metrics in addition to dimensions. For a known device, use Puppeteer’s device descriptor:
const puppeteer = require('puppeteer');
const { devices } = puppeteer;
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.emulate(devices['iPhone 13']);
await page.goto('https://example.com', { waitUntil: 'networkidle2' });
await page.screenshot({ path: 'iphone.png', fullPage: true });
await browser.close();
})();
page.emulate(device) applies the device’s viewport and user-agent configuration together. Perform it before navigation. If you only need a custom size, use setViewport() and explicitly set the mobile properties:
await page.setViewport({
width: 390,
height: 844,
deviceScaleFactor: 3,
isMobile: true,
hasTouch: true,
isLandscape: false,
});
Puppeteer warns that some sites do not expect a phone to change size after loading. Changing isMobile or hasTouch can reload a page, so configure these values before goto() and wait for navigation or the application’s ready signal afterward.
Viewport, content area, window, and display: what changes?
These controls are related but not interchangeable.
Rank #2
- 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
| Goal | Control | What it changes | Important caveat |
|---|---|---|---|
| Responsive page layout | page.setViewport({ width, height }) |
The page’s CSS viewport | Set it before navigation when possible; mobile/touch changes may reload. |
| Known phone or tablet | page.emulate(device) |
Device viewport plus user agent | Emulate before navigation. |
| Browser content dimensions | page.resize({ contentWidth, contentHeight }) |
The content area inside a browser window | The window-management guide’s example first removes the default viewport constraint and treats the update as asynchronous. |
| Outer window position, state, or size | browser.setWindowBounds(windowId, bounds) |
Chrome window bounds such as position, dimensions, or state | This is window management, not a page-layout API; obtain the correct window identifier and verify with the corresponding bounds method. |
| Simulated headless monitor | Launch --screen-info, or use browser.addScreen()/browser.removeScreen() |
Headless screen geometry | These screen controls are for headless mode; headful Chrome uses the platform’s physical screens. |
Resize the browser content area
Use page.resize() when the test is about the browser’s content area rather than the CSS viewport alone. The operation is asynchronous, so wait for the page’s resize reporting or another application-ready condition. A typical sequence is:
const page = await browser.newPage();
await page.setViewport(null);
await page.resize({ contentWidth: 1280, contentHeight: 800 });
await page.waitForFunction(() => document.documentElement.clientWidth > 0);
Removing the default viewport constraint matters in this workflow: otherwise the page viewport can continue imposing a separate limit. Use this method when a window-management test needs content dimensions, not when you simply want a responsive breakpoint.
Set outer browser-window bounds
Window bounds include the outer Chrome window’s position, size, and state. They are distinct from the page’s CSS viewport. In a supported window-management setup, identify the browser window and call:
await browser.setWindowBounds(windowId, {
left: 40,
top: 40,
width: 1440,
height: 900,
windowState: 'normal',
});
Use the matching window-identifier and bounds methods from Puppeteer’s window-management API to obtain and verify windowId. A maximized or fullscreen state can override numeric bounds; set a normal state before asserting exact width and height. Headless runs may not expose a conventional desktop window, so do not use this approach to simulate a monitor in headless Chrome.
Configure a headless screen
When code needs a virtual display rather than just a page viewport, launch Chrome with --screen-info:
Rank #3
- 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.
const browser = await puppeteer.launch({
headless: true,
args: ['--screen-info={800x600}'],
});
The screen-configuration guide describes one 800 by 600 headless screen when no screen or window-size switch is supplied. If --window-size is supplied instead, the headless screen is as large as the requested window. Puppeteer also exposes browser.addScreen() and browser.removeScreen() for dynamic headless screen changes. These APIs model display topology; they do not replace page.setViewport().
Understand the defaults
ConnectOptions documents an 800 by 600 default viewport for each new page. The headless screen guide separately describes an 800 by 600 screen in the absence of relevant switches. Those are different defaults: one is page layout, the other is simulated display geometry. Check the installed Puppeteer version before relying on exact defaults or newer screen and window methods.
Timing, navigation, and reliable assertions
- Launch and create the page. Set launch flags before Chrome starts; screen flags cannot be retrofitted reliably.
- Configure geometry before navigation. Apply
setViewport()oremulate()beforegoto()so the first document render uses the intended metrics. - Wait for the right readiness condition.
networkidle2can help for mostly static pages, but applications with polling may never become idle. Prefer a meaningful selector or application-ready flag when available. - Assert CSS pixels, not screenshots alone. Check
window.innerWidth,window.innerHeight, or element geometry when diagnosing a breakpoint. - Capture after layout settles. Fonts, lazy images, animations, and late scripts can change pixels after navigation. Disable or wait for them when visual output must be stable.
const metrics = await page.evaluate(() => ({
innerWidth: window.innerWidth,
innerHeight: window.innerHeight,
dpr: window.devicePixelRatio,
}));
console.log(metrics);
Common errors and fixes
“My screenshot is still the old size”
Check that setViewport() runs on the same Page instance used for navigation and capture. Put it before goto(), and inspect window.innerWidth. A full-page screenshot can be taller than the viewport by design; that does not mean the viewport width failed.
“The site shows desktop content on a phone width”
Width alone does not create a complete mobile identity. Use page.emulate() for a known device, or set isMobile, hasTouch, and an appropriate user agent together. Configure them before navigation because changing mobile metrics later may reload the page.
“Changing the viewport unexpectedly reloads the page”
This is expected for some changes, especially isMobile and hasTouch. Apply those options before navigation, then wait for the new document or application-ready selector.
Rank #4
- 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
“The window is the right size but the layout is wrong”
You probably changed outer window bounds while a page viewport constraint remained active. For content-area tests, remove the default viewport with page.setViewport(null) and use page.resize(). For responsive layout tests, use setViewport() directly.
“Headless mode ignores my monitor size”
A physical monitor is not available to headless Chrome. Use --screen-info or the headless screen APIs. If you supplied --window-size, remember that it affects the simulated screen size described by the screen guide.
“The API is missing”
Puppeteer’s documentation surfaced version labels 25.10.0, 25.11.0, and 25.12.0. APIs such as screen and window management are version-sensitive. Inspect the version installed in your project and consult the matching documentation before depending on a newer method.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Capture the result without maintaining a browser script
If the actual goal is a repeatable website image or PDF rather than browser automation, ScreenshotNeo provides a website screenshot API and MCP server. It accepts a URL and returns PNG, JPEG, WebP, or PDF. Cookie and consent banners are accepted before capture, and more than 60 known consent platforms, newsletter popups, and chat widgets are removed; each cleanup step can be disabled.
Or skip the browser setup:
Use one GET request with a viewport parameter when you need a fixed page size (parameter names used by other screenshot APIs also work):
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo documentation for the complete option set, including viewport and device presets, full-page capture with lazy images loaded, CSS-selector element capture, dark mode, retina scale, PDF paper and page-range controls, custom CSS and JavaScript, clicks, selector or network-idle waits, request and resource blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, chosen cache TTLs, signed image links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, usage reporting, and the OpenAPI specification.
Best Value
- 【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.
Python:
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)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
Only clean shots are billed. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers identify the page verdict and billing result with X-Page-Verdict and X-Billed. Its MCP server includes take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
Cost, repeatability, and version notes
- Viewport dimensions are test inputs, not universal design recommendations. Record them with the test so failures can be reproduced.
- Keep geometry configuration in one helper or fixture. This prevents one suite from accidentally mixing CSS viewport, content-area, and window-size assumptions.
- Pin or record the Puppeteer version. The documented API surface and defaults can change between releases.
- For screenshot pipelines, wait for the same selectors and fonts on every run. A correct viewport cannot compensate for nondeterministic page content.
- Use a separate test for each geometry boundary that matters to your application instead of assuming one desktop and one phone size cover every breakpoint.
Frequently Asked Questions
Can I set a viewport after calling page.goto()?
Yes, but the page may already have rendered using the old metrics, and mobile or touch changes can trigger a reload. Configure the viewport before navigation for predictable tests.
Does deviceScaleFactor change CSS breakpoints?
No. Breakpoints use CSS-pixel viewport dimensions. Device scale changes the relationship between CSS pixels and rendered device pixels, which affects screenshots and pixel density.
Free tools Windows power users keep installed
One-click scans. No signup required.
Why is my full-page screenshot taller than the height I set?
The height passed to setViewport() is the visible viewport. A full-page capture intentionally expands vertically to include document content.
Quick Recap
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.

