```yaml
product: AlterLab
title: "Browser Context — Web Scraping Glossary | AlterLab"
comparison_context: "AlterLab is an alternative to Firecrawl, ScrapingBee, and Bright Data."
source_url: https://alterlab.io/glossary/browser-context
```

browser

# Browser Context

A browser context is an isolated browser session within a single browser process, with separate cookies, cache, and storage — enabling parallel scraping without session cross-contamination.

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.

### What is Browser Context?

A browser context is an isolated browser session within a single browser process, with separate cookies, cache, and storage — enabling parallel scraping without session cross-contamination.

### How does AlterLab handle Browser Context?

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.

## Examples

```
// Playwright: create isolated browser contexts for parallel scraping
const browser = await chromium.launch();
const contexts = await Promise.all(
  urls.map(async (url) => {
    const ctx = await browser.newContext({ locale: "en-US" });
    const page = await ctx.newPage();
    await page.goto(url);
    return page.content();
  })
);
await browser.close();
```

## Related Terms

[Headless BrowserA web browser that runs without a graphical user interface, executing JavaScript and rendering pages exactly as a real browser would.](https://alterlab.io/glossary/headless-browser)[PlaywrightAn open-source browser automation library from Microsoft that controls Chromium, Firefox, and WebKit through a unified async API.](https://alterlab.io/glossary/playwright)[PuppeteerA Node.js library providing a high-level API to control Chrome or Chromium over the DevTools Protocol, commonly used for scraping JavaScript-heavy sites.](https://alterlab.io/glossary/puppeteer)[Session ManagementThe handling of cookies, authentication tokens, and browser state across multiple requests to maintain a continuous browsing session.](https://alterlab.io/glossary/session-management)[ConcurrencyConcurrency in scraping refers to the number of requests or browser sessions running in parallel, which directly controls throughput and resource consumption.](https://alterlab.io/glossary/concurrency)

## Extract Browser Context data from any website

AlterLab returns clean, structured data from any public URL — no scraper infrastructure needed. Start free, no credit card required.

[View API docs](https://alterlab.io/docs/api/rest)

[Back to Glossary](https://alterlab.io/glossary)