Use browser.createBrowserContext() to create a separate Puppeteer session, then use context.newPage() to create pages inside it. Puppeteer documents that separate browser contexts do not share cookies or cache; use context.pages() to manage one session’s pages and browser.pages() to inspect pages across the browser.
Create an isolated browser context
A BrowserContext represents a user context within a browser instance. Puppeteer describes context storage as isolated, including cookies and localStorage, and states that a newly created context does not share cookies or cache with other contexts. See the createBrowserContext() method and the Puppeteer API reference.
As an Amazon Associate I earn from qualifying purchases.
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch();
const context = await browser.createBrowserContext();
const page = await context.newPage();
await page.goto('https://example.com');
Each independent session that needs separate cookies and cache should use its own context. Create its pages from that context rather than from the browser object.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Choose between browser.newPage() and context.newPage()
browser.newPage() creates a page in the browser’s default context. context.newPage() creates a page in the context you selected, such as one created with browser.createBrowserContext(). The distinction matters when pages must belong to independent sessions. The Browser class reference documents the browser methods, and the context creation reference shows the context-scoped pattern.
#1 Best Overall
- 【Instant Snap-on Magnetic Attachment】- The Patented Magnetic Privacy Screen – Protected by U.S. Patents 9,829,669 and D844,012. Simply place the privacy screen along the top of your MacBook and let the magnets attach along the top. No need for tricky placement, messy tape, or damaging adhesive. Easily remove and reattach when you need it.
- 【Filter Dimensions】: Width: 11 15/16" (304 mm), Height: 7 1/2" (190 mm), Diagonal: 14.1" (358.14 mm) - SightPro Blackout Privacy Filter is engineered to be compatible with Lenovo, HP, Dell, Acer, Asus, Samsung, and other laptop brands. Please verify your screen's width and height measurements before ordering. It's not recommended to make your selection based solely on your screen's diagonal size. [Not optimized for touchscreens.]
- 【Superior Privacy】- Our advanced multi-layered film filter blacks out your screen when viewing from the side, while maintaining a crystal clear screen straight-on. It also protects your eyes from harmful UV and blue light. [Note: It does not block visibility directly behind you, regardless of the distance.]
- 【Perfect for Travel and Open Workspaces】- The Laptop Privacy Screen Filter is the ideal solution for healthcare providers, mobile workers, commuters, students, and business travelers. Now you can stay compliant and safeguard sensitive corporate information while working in airplanes, subways, airports, and public areas.
- 【Package Contents】- Each package includes a magnetic privacy screen filter, magnetic stickers, a webcam privacy cover, a storage folder, and a cleaning cloth. Buy with confidence – located in the US, Sight Pro specializes in providing best-in-class privacy solutions to individuals, small businesses, corporations, government, and educational institutions. Our privacy screens are Section 889 and TAA compliant.
| Choice | Session scope | How to enumerate pages | Lifecycle note |
|---|---|---|---|
browser.newPage() |
Default browser context; it is not a newly isolated context. | browser.pages() lists pages across the browser. |
The default context cannot be closed. |
context.newPage() |
The context you created; separate contexts do not share cookies or cache. | context.pages() lists pages in that context. |
Use the context object to manage pages for that session. |
The default context is available from browser.defaultBrowserContext(); Puppeteer documents that it cannot be closed. A launched browser has at least this default context. See defaultBrowserContext() and browserContexts().
List contexts and pages
Inspect pages in one session
const pagesInSession = await context.pages();
console.log(pagesInSession);
context.pages() returns pages in that context. Puppeteer notes that non-visible pages such as background_page are not returned by default; its context API points to Target.page() for those cases. See BrowserContext.pages().
Rank #2
- Filter Dimensions: Width: 11 15/16" (304 mm), Height: 7 1/2" (190 mm), Diagonal: 14.1" (358.14 mm) - SightPro Blackout Privacy Filter is engineered to be compatible with Lenovo, HP, Dell, Acer, Asus, Samsung, and other laptop brands. Please verify your screen's width and height measurements before ordering. It's not recommended to make your selection based solely on your screen's diagonal size. [Not optimized for touchscreens.]
- Two Attachment Options - Installs in minutes. Option 1 uses clear adhesive strips that securely attach to any screen. Option 2 uses slide mount tabs that easily stick to the display frame, allowing you to slide the filter on and off the screen as needed.
- Superior Privacy and Anti Glare - Our advanced multi-layered film filter blacks out your screen when viewing from the side, while maintaining a crystal clear screen straight-on. It also protects your eyes from harmful glare, UV, and blue light. [Note: It does not block visibility directly behind you, regardless of the distance.]
- Perfect for Travel and Open Workspaces - Our computer screen privacy filter is the ideal solution for healthcare providers, mobile workers, commuters, students, and business travelers. Now you can stay compliant and safeguard sensitive corporate information while working in airplanes, subways, airports and public areas.
- Package Contents - Each package includes one privacy screen shield filter, two sets of clear adhesive strips, two sets of slide mount tabs, and a microfiber cleaning cloth. Buy with confidence – located in the US, Sight Pro specializes in providing best-in-class privacy solutions to individuals, small businesses, corporations, government, and educational institutions. Our privacy screens are Section 889 and TAA compliant.
Inspect pages across the browser
const pagesInBrowser = await browser.pages();
console.log(pagesInBrowser);
browser.pages() returns pages across the browser, which is useful when coordinating multiple contexts. See Browser.pages().
Inspect available contexts
const contexts = browser.browserContexts();
console.log(contexts);
browser.browserContexts() lists the browser’s contexts, including its default context. See the browserContexts() reference.
Rank #3
- 【Instant Snap-on Magnetic Attachment】- The Patented Magnetic Privacy Screen – Protected by U.S. Patents 9,829,669 and D844,012. Simply place the privacy screen along the top of your MacBook and let the magnets attach along the top. No need for tricky placement, messy tape, or damaging adhesive. Easily remove and reattach when you need it.
- 【Filter Dimensions】: Width: 13.56" (344.5 mm), Height: 8.49" (215.6 mm), Diagonal: 16" (406 mm) - SightPro Blackout Privacy Filter is engineered to be compatible with Lenovo, HP, Dell, Acer, Asus, Samsung, and other laptop brands. Please verify your screen's width and height measurements before ordering. It's not recommended to make your selection based solely on your screen's diagonal size. [Not optimized for touchscreens.]
- 【Superior Privacy】- Our advanced multi-layered film filter blacks out your screen when viewing from the side, while maintaining a crystal clear screen straight-on. It also protects your eyes from harmful UV and blue light. [Note: It does not block visibility directly behind you, regardless of the distance.]
- 【Perfect for Travel and Open Workspaces】- The Laptop Privacy Screen Filter is the ideal solution for healthcare providers, mobile workers, commuters, students, and business travelers. Now you can stay compliant and safeguard sensitive corporate information while working in airplanes, subways, airports, and public areas.
- 【Package Contents】- Each package includes a magnetic privacy screen filter, magnetic stickers, a webcam privacy cover, a storage folder, and a cleaning cloth. Buy with confidence – located in the US, Sight Pro specializes in providing best-in-class privacy solutions to individuals, small businesses, corporations, government, and educational institutions. Our privacy screens are Section 889 and TAA compliant.
Understand popups and the meaning of incognito
If a page opens a popup with window.open, Puppeteer documents that the popup belongs to the parent page’s browser context. That keeps it associated with the same context rather than making it a new independent session. Puppeteer’s API reference also notes that Chrome’s non-default contexts are incognito, while the default context can also be incognito if Chrome is launched with the --incognito argument. These are documented context and storage behaviors, not a general security guarantee.
Keep browser versions and launch configuration aligned
Puppeteer states that it is only guaranteed to work with its bundled browser. If you set a custom executable path, you do so at your own risk; consult the LaunchOptions reference for launch configuration details. Keep the Puppeteer API documentation you rely on aligned with your installed version: the cited API pages display version labels that can change over time.
Rank #4
- 【Filter Dimensions】: Width: 13 9/16" (345 mm), Height: 7 5/8" (194 mm), Diagonal: 15.6" (396.24 mm) - SightPro Blackout Privacy Filter is engineered to be compatible with Lenovo, HP, Dell, Acer, Asus, Samsung, and other laptop brands. Please verify your screen's width and height measurements before ordering. It's not recommended to make your selection based solely on your screen's diagonal size. [Not optimized for touchscreens.]
- 【Two Attachment Options】- Installs in minutes. Option 1 uses clear adhesive strips that securely attach to any screen. Option 2 uses slide mount tabs that easily stick to the display frame, allowing you to slide the filter on and off the screen as needed.
- 【Superior Privacy and Reduce Glare】- Our advanced multi-layered film filter blacks out your screen when viewing from the side, while maintaining a crystal clear screen straight-on. It also protects your eyes from harmful glare, UV, and blue light. [Note: It does not block visibility directly behind you, regardless of the distance.]
- 【Perfect for Travel and Open Workspaces】- Our computer screen privacy filter is the ideal solution for healthcare providers, mobile workers, commuters, students, and business travelers. Now you can stay compliant and safeguard sensitive corporate information while working in airplanes, subways, airports and public areas.
- 【Package Contents】- Each package includes one privacy screen shield filter, two sets of clear adhesive strips, two sets of slide mount tabs, and a microfiber cleaning cloth. Buy with confidence – located in the US, Sight Pro specializes in providing best-in-class privacy solutions to individuals, small businesses, corporations, government, and educational institutions. Our privacy screens are Section 889 and TAA compliant.
Troubleshoot context and page issues
- Pages unexpectedly share session data: Check whether both pages were created in the default context with
browser.newPage(). Create a separate context withbrowser.createBrowserContext()and pages throughcontext.newPage()when cookies and cache must be separated. - A page is missing from
context.pages(): The method does not return non-visible pages such asbackground_pageby default. For that case, follow the API reference’s direction toTarget.page(). - Closing the default context fails: Puppeteer documents that the default context cannot be closed. Use
browser.defaultBrowserContext()to identify it and manage the independently created contexts separately. - A custom browser executable behaves unexpectedly: Puppeteer guarantees compatibility only with its bundled browser. Check the installed Puppeteer and browser setup against the launch options documentation before relying on a custom executable.
Or skip the browser setup
If your goal is to get a website screenshot rather than automate multiple browser sessions, ScreenshotNeo takes a screenshot through one API request. Cookie banners are accepted or removed before capture, and newsletter popups and chat widgets are removed; each of those steps can be turned off. Bot checks, blank pages and failed loads are never billed, and responses report the page verdict and billing status. An MCP server lets AI agents use screenshot tools. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. See the ScreenshotNeo API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Quick Recap
Best Value
- 【Instant Snap-on Magnetic Attachment】- The Patented Magnetic Privacy Screen – Protected by U.S. Patents 9,829,669 and D844,012. Simply place the privacy screen along the top of your MacBook and let the magnets attach along the top. No need for tricky placement, messy tape, or damaging adhesive. Easily remove and reattach when you need it.
- 【Filter Dimensions】: Width: 12 3/16" (310 mm), Height: 6 7/8" (175 mm), Diagonal: 14" (355.6 mm) - There are two different 14 inch screen sizes, please select the correct one. SightPro Blackout Privacy Filter is engineered to be compatible with Lenovo, HP, Dell, Acer, Asus, Samsung, and other laptop brands. Please verify your screen's width and height measurements before ordering. It's not recommended to make your selection based solely on your screen's diagonal size. [Not optimized for touchscreens.]
- 【Superior Privacy】- Our advanced multi-layered film filter blacks out your screen when viewing from the side, while maintaining a crystal clear screen straight-on. It also protects your eyes from harmful UV and blue light. [Note: It does not block visibility directly behind you, regardless of the distance.]
- 【Perfect for Travel and Open Workspaces】- The Laptop Privacy Screen Filter is the ideal solution for healthcare providers, mobile workers, commuters, students, and business travelers. Now you can stay compliant and safeguard sensitive corporate information while working in airplanes, subways, airports, and public areas.
- 【Package Contents】- Each package includes a magnetic privacy screen filter, magnetic stickers, a webcam privacy cover, a storage folder, and a cleaning cloth. Buy with confidence – located in the US, Sight Pro specializes in providing best-in-class privacy solutions to individuals, small businesses, corporations, government, and educational institutions. Our privacy screens are Section 889 and TAA compliant.
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.




