In Playwright and Puppeteer, a browser context is a lightweight container that mimics an incognito window: it shares the browser process and network stack but maintains completely separate cookies, local storage, IndexedDB, and authentication state. Multiple contexts can run concurrently inside a single browser, each acting as an independent user session.
Browser contexts are the preferred unit of isolation for parallel scraping tasks. Creating a new context is orders of magnitude cheaper than launching a new browser instance, allowing a single browser process to handle many simultaneous scraping sessions efficiently. Each context can also have distinct viewport dimensions, locale settings, geolocation overrides, and HTTP authentication credentials.
For anti-bot evasion, each context should be treated as a distinct user: avoid sharing cookies or storage between contexts, and apply consistent fingerprint settings within a context (same user agent, viewport, timezone) so that the fingerprint remains coherent across a session.