Use page.viewport() to read Puppeteer’s configured viewport and await page.setViewport({ width, height }) to change it. Set the viewport before navigating when possible; use page.emulate(device) instead when you need a device profile that includes a user agent as well as viewport metrics.
Set a Puppeteer viewport
Call setViewport() on a Page, passing a viewport object with pixel dimensions. The official example sets a 640 × 480 viewport before opening the site:
const page = await browser.newPage();
await page.setViewport({
width: 640,
height: 480,
deviceScaleFactor: 1,
});
await page.goto('https://example.com');
const configuredViewport = page.viewport();
console.log(configuredViewport);
setViewport() is asynchronous, so await it before navigating or taking a screenshot. Puppeteer recommends setting it before navigation: changing certain settings after the page loads may produce unexpected behavior, and changing isMobile or hasTouch can reload the page. See the Page.setViewport() API reference.
Viewport options
The viewport object uses width and height for its dimensions. You can also set deviceScaleFactor, as in the example. The API accepts a Viewport object or null; consult the reference for the full set of properties supported by your installed Puppeteer version.
#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
Read the configured viewport
Call page.viewport() to retrieve Puppeteer’s current configured viewport settings:
const viewport = page.viewport();
console.log(viewport);
The method returns Viewport | null. It reports the value configured through page.setViewport() or the default supplied through ConnectOptions.defaultViewport; it does not independently measure the page’s actual viewport. The distinction matters if you are trying to verify browser rendering rather than inspect Puppeteer’s configuration. See the Page.viewport() API reference.
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
Reset the viewport to its default
Pass null to reset the page to its configured default viewport:
await page.setViewport(null);
Unless you configured another default, Puppeteer’s documented ConnectOptions.defaultViewport default is { width: 800, height: 600 }. That default is set for each page. See ConnectOptions.defaultViewport and the setViewport() reference.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesRank #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.
Choose between manual dimensions and device emulation
- Use
setViewport()when you need to control dimensions and viewport settings without changing the user agent. - Use
page.emulate(device)when you need a known device profile that applies device metrics and user-agent settings together. For example, the current documentation showsKnownDevices['iPhone 17 Pro']:
import { KnownDevices } from 'puppeteer';
const device = KnownDevices['iPhone 17 Pro'];
await page.emulate(device);
await page.goto('https://example.com');
Emulation should also be applied before navigation. The available device definitions can change between Puppeteer versions, so check the list in the version installed in your project. See Page.emulate().
Viewport size versus browser window size
A page viewport and the browser window’s content area are related, but managed separately. If your task is to resize the browser window’s content dimensions, use Puppeteer’s window-management API rather than treating setViewport() as a window-resizing method. The window-management guide clears the default viewport with page.setViewport(null) before calling page.resize(); follow that guide’s sequence for your browser setup: Puppeteer window management.
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
Common viewport problems
page.viewport()returns a value different from what the browser appears to show: it returns configured settings, not a measurement of the rendered page. Check the actual page or browser content area separately.- The page reloads after setting the viewport: changing
isMobileorhasTouchcan trigger a reload. Set the desired values before navigation when possible. - The site renders at the wrong size: confirm that you awaited
setViewport()and called it beforegoto(). Also check whether you intended to resize the browser window rather than the page viewport. - A device profile is not found: device names depend on the definitions in the installed Puppeteer version. Check that version’s
KnownDeviceslist, or use a manual viewport object if only dimensions are needed. - The viewport resets to an unexpected size:
setViewport(null)restores the configured default. CheckConnectOptions.defaultViewport; absent an override, its documented dimensions are 800 × 600.
Or skip the browser setup
If you need a website screenshot rather than a Puppeteer viewport in a browser you manage, ScreenshotNeo takes a screenshot with one GET request. For example, with cURL:
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. ScreenshotNeo accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups and chat widgets before capture; each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and the response identifies the page verdict and billing status in headers. Its MCP server gives AI agents tools for screenshots, page information and PDF capture. The free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 screenshots.
Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month with no card.
Quick Recap
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.
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.

