Playwright makes provider switching easy
Playwright accepts proxy server, username and password as options, per browser or per context. Switching between Webshare and Geonode is a matter of changing three values:
const ctx = await browser.newContext({
proxy: { server: PROVIDER.server, username: PROVIDER.user(sessionId), password: PROVIDER.pass },
locale: "en-US",
timezoneId: "America/New_York",
});That makes Playwright ideal for running both providers side by side and routing by target. Provider guides: Webshare with Playwright and Geonode with Playwright.
Session strategies
| Strategy | Webshare | Geonode |
|---|---|---|
| One IP per context | Session number in username | Session ID in username |
| Long-lived context (hours) | Static residential IP | Sticky up to 24 hours, or ISP IP |
| New IP per task | New context with a new session number | New context with a new session ID |
| Fixed IP per profile | Datacenter or static residential list | ISP proxies |
Match the context to the IP
On either provider, set locale, timezoneId and geolocation to match the proxy's country or city. Both support country and city targeting on residential traffic (Webshare adds ZIP), so you can generate matching contexts per market. Mismatches are a common reason for challenges. See browser fingerprinting and proxies.
Bandwidth and cost
Playwright page loads are as heavy as any browser's. Use route-based blocking on both:
await ctx.route("**/*", (r) => (["image", "media", "font"].includes(r.request().resourceType()) ? r.abort() : r.continue()));For residential traffic, Geonode's lower per-GB list prices and non-expiring bandwidth usually make it the cheaper choice. For datacenter-friendly targets, Webshare's per-IP lists remove per-GB costs. See pricing compared.
Running both in one test suite
A useful pattern for teams that test or scrape many markets:
- Define providers as objects with
server,user(session)andpass. - Map each target domain to a provider and product.
- Create contexts from that map, with locale and timezone per market.
- Record success per provider per domain, and adjust the map monthly.
Proxy tip: If you need managed scraping rather than raw proxies, Geonode also sells a Scraper API with a free monthly allowance, which Webshare doesn't offer. More in using Geonode with Playwright.
Which to choose by job
| Playwright job | Better fit |
|---|---|
| Cross-market QA on lenient sites | Webshare datacenter lists by country |
| Scraping protected sites | Geonode residential, test Webshare |
| Long authenticated sessions | Geonode sticky sessions or either provider's static IPs |
| ZIP-level checks | Webshare residential |
| Hard pages, low volume | Geonode Scraper API |
Verdict
Playwright removes setup differences. Pick by product: Webshare for cheap datacenter and static IPs and ZIP targeting, Geonode for cheaper residential traffic and long sticky sessions.
Context-per-market pattern with two providers
| Market | Provider | Product | Reason |
|---|---|---|---|
| US | Webshare | Datacenter | Lenient QA targets |
| Germany | Geonode | Residential | Target blocks datacenter |
| Japan | Webshare | Residential, city | Needs city-level checks |
Store this table in config and build contexts from it, so routing changes need no code edits.
Parallelism limits
Run a few browsers with many contexts each, and cap total contexts to what your plans handle: Webshare's thread limit for its products, and a measured comfortable concurrency for residential gateways on either provider.
Budget tip: Many teams end up using both: Webshare for cheap per-IP datacenter and static residential lists, Geonode for per-GB residential traffic that doesn't expire. Start with using Webshare with Playwright.
Debugging differences between providers
If a page works through one provider and not the other, compare traces: response codes, redirects and challenge pages. The difference is usually IP reputation on that target or a targeting mismatch, not Playwright itself.
A real-world example
A QA platform runs customer test suites from 20 countries. Datacenter contexts through Webshare cover 17 countries where the customers' sites treat datacenter traffic normally. Three countries go through Geonode residential contexts because a customer's CDN serves different content to datacenter ranges there. Locale and timezone are set per context, and the platform tags every result with the provider and country.
Before you commit to any provider, it helps to see the wider market: our guide to the best proxies in 2026 compares proxy types by job, and cheap proxies explains how to keep costs down without buying IPs that get blocked. For browser automation in depth, see our Puppeteer proxies guide.
Key takeaways
- Playwright's per-context proxy options make running both providers side by side easy.
- Match locale, timezone and geolocation to each context's IP.
- Use Webshare for cheap datacenter QA and ZIP targeting, Geonode for cheaper residential and long sessions.
- Cap contexts to what your plans handle.
- Keep provider routing in config, not code.
FAQ
Can each Playwright context use a different provider?
Yes. Proxy settings are per context, so you can mix Webshare and Geonode in one browser.
Does Playwright support SOCKS5 with authentication?
Browsers generally don't support SOCKS5 authentication. Use HTTP proxies with credentials, or SOCKS5 with IP allowlisting.
Is Playwright better than Puppeteer with these providers?
Both work. Playwright's per-context proxy options make multi-provider setups simpler.
Does Playwright handle proxy authentication for both providers?
Yes, through the username and password proxy options.
Can I change a context's proxy after creating it?
No. Create a new context with the new proxy.
Should I use residential IPs for QA?
Only where the site treats datacenter traffic differently; otherwise datacenter is cheaper.
Editorial note: Proxy providers change their pools, features and prices often, so treat any figures here as typical ranges at the time of writing and confirm current terms with the provider before you buy.