How Sites Detect Headless Browsers (And How to Evade Each Signal) — 2026 Guide
Websites can detect headless browsers through dozens of signals. Most scraper tutorials show you how to launch Playwright — none explain why it still gets blocked. Here's what sites are actually ch...

Source: DEV Community
Websites can detect headless browsers through dozens of signals. Most scraper tutorials show you how to launch Playwright — none explain why it still gets blocked. Here's what sites are actually checking and how to evade each signal. How headless detection works Detection is probabilistic, not binary. Sites like Cloudflare, Akamai, and DataDome maintain a "bot score" based on many signals. Each anomaly adds to your score. Enough anomalies = block. The most common signals: navigator.webdriver = true Missing browser plugins Specific headless Chrome flags Canvas/WebGL fingerprint anomalies Chrome DevTools Protocol (CDP) exposure User-agent / platform inconsistencies Missing media codecs Behavioral signals (mouse movement, timing) Signal 1: navigator.webdriver The most obvious signal. Chrome headless sets navigator.webdriver = true by default. How to fix: // Playwright const context = await browser.newContext(); await context.addInitScript(() => { Object.defineProperty(navigator, 'webdr