The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →To remove a screen added to headless Chrome at runtime, call await browser.removeScreen(screenId) with the ID returned by browser.addScreen(). If you mean the page’s viewport instead, use await page.setViewport(null); that resets page dimensions, not the browser’s screen configuration.
First identify what “virtual screen” means
Puppeteer has separate controls for Chrome’s screen configuration and for a page viewport. A screen is part of the browser’s display setup; a viewport is the area in which an individual page renders. Removing a screen will not reset a viewport, and resetting a viewport will not remove a screen.
| What you want to change | Use | Scope |
|---|---|---|
| Remove a screen added while headless Chrome is running | browser.removeScreen(screenId) |
Browser screen configuration; dynamic removal is headless-only. |
| Reset a page viewport | page.setViewport(null) |
That page’s viewport. |
| Resize page content dimensions | page.resize({contentWidth, contentHeight}) |
Browser window content dimensions, using Puppeteer’s window-management API. |
Remove a screen added at runtime
Puppeteer’s screen-configuration guide documents Browser.addScreen() and Browser.removeScreen() for adding and removing screens while Chrome is running. Save the returned screen object and pass its id to the removal method.
const added = await browser.addScreen({
left: 800,
top: 0,
width: 800,
height: 600,
label: '2nd',
});
await browser.removeScreen(added.id);
If you already have the screen ID, pass it directly:
Recommended Free Tools
#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
await browser.removeScreen(screenId);
The official guide’s example returns the screen count from two to one after removing the added screen. The example coordinates and dimensions describe that configuration; use the ID for the screen you actually added rather than deriving an ID from its position or size.
Check the current screens
Use await browser.screens() to inspect the browser’s screen list. The guide documents this inspection method in both headless and headful modes, even though runtime add and remove are headless-only.
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
const screens = await browser.screens();
console.log(screens);
Mode and launch configuration
The dynamic addScreen() and removeScreen() APIs apply to headless Chrome. If Chrome is headful, the guide describes its screens as physical platform screens; do not expect the headless runtime-removal API to remove one.
The guide also notes that, absent a --screen-info switch, headless Chrome has one default 800×600 screen unless --window-size is specified, in which case the screen is as large as the requested window. That launch-time sizing is distinct from removing a screen added later.
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.
Reset the page viewport instead
If the issue is that responsive layout or page rendering is constrained by a viewport set earlier in the script, reset it with null:
await page.setViewport(null);
Puppeteer’s Page.setViewport() reference says null resets the viewport to its default value. It does not change the browser’s screen list.
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
Some viewport changes can reload the page when settings involving isMobile or hasTouch change. If a reset is followed by a reload, check those emulation options as well as the viewport dimensions.
Resize page content dimensions
If your goal is to change the browser window’s content width or height rather than screen topology or page viewport emulation, Puppeteer documents Page.resize(). Its window-management guide clears the default viewport first and waits for the resize event because the inner window size updates asynchronously.
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.
await page.setViewport(null);
const resized = new Promise(resolve => {
page.once('resize', resolve);
});
await page.resize({ contentWidth: 1200, contentHeight: 800 });
await resized;
const dimensions = await page.evaluate(() => ({
width: window.innerWidth,
height: window.innerHeight,
}));
console.log(dimensions);
Use the resize event before reading the new inner dimensions; otherwise, code may observe the previous size while the update is still pending.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshoot the wrong-size or extra-screen problem
removeScreenis unavailable or does not apply: Confirm that Chrome is running headless. The dynamic screen methods are documented for headless mode only.- The page still renders at the old dimensions: Check whether the changed value is the page viewport, the screen configuration, or the browser content size. Use the corresponding API rather than substituting one for another.
- You do not know the screen ID: Inspect
await browser.screens()and retain the object returned byaddScreen()in future code so its ID is available for removal. - Dimensions appear unchanged immediately after resizing: Wait for the window resize event before reading
window.innerWidthorwindow.innerHeight. - The page reloads after a viewport change: Review changes to
isMobileandhasTouch, which Puppeteer identifies as settings that can trigger a reload in some cases.
Or skip the browser setup:
If your actual goal is to capture a website rather than manage Chrome’s screen topology, ScreenshotNeo returns a screenshot or PDF with one GET request. Its clean-shot steps accept cookie and consent banners like a visitor, then remove more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off.
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 API documentation for request options. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers identify the page verdict and whether the request was billed. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents and other MCP clients. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.
Sign up for 1,000 free screenshots a month with no card.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsQuick 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.




