Playwright Firefox vs Real Firefox: What Actually Gives It Away

UNDETECTED LABS4 MIN READ
On this page

Plain Playwright Firefox fails Cloudflare in our benchmark, headed and headless. Camoufox and invisible-playwright, also Firefox, pass it. So is Playwright the thing getting caught, or Firefox?

Playwright doesn’t drive the Firefox you download from Mozilla. It ships its own build with a patched automation protocol, and Playwright 1.62 comes with Firefox 153.0. We downloaded Firefox 153.0 from Mozilla (signature and checksum checked) and compared the two on the same Linux server, through the same residential proxies.

The network fingerprint is the same

Both browsers opened our Echo page, which records the TLS handshake, the HTTP/2 settings and the order of the headers. Playwright’s Firefox, headed and headless, sent exactly what Mozilla’s Firefox 153 sent:

Playwright Firefox 153 Mozilla Firefox 153
JA4 t13d1617h2_86a278354501_3cbfd9057e0d same
HTTP/2 1:65536;2:0;4:131072;5:16384|12517377|0|m,p,a,s same
Header order user-agent, accept, accept-language, … te same

A server can’t tell them apart from the connection alone.

What it can see is the version. Firefox 161.0.1 is the current release, and its handshake is different: it dropped one cipher suite (0xc00a) and the two finite-field groups (ffdhe2048 and ffdhe3072), so its JA4 starts with t13d1517 instead of t13d1617. Playwright’s build matches its own User-Agent, which says 153. It is just eight versions old.

What JavaScript sees

We loaded the same test page in both and read the usual properties:

Property Playwright Firefox Mozilla Firefox
navigator.webdriver true false
navigator.plugins 0 5
navigator.mimeTypes 0 2
navigator.pdfViewerEnabled false true
Window size 1280×720, always whatever the window is

The plugin numbers come from the PDF viewer. Firefox reports five built-in PDF plugins when it is on, and Playwright’s build turns it off. The fixed 1280×720 is Playwright’s default viewport, so every page sees the same size unless you change it.

Everything else matched: User-Agent, platform, CPU count, languages, the WebGL renderer, even the frozen build ID.

Cloudflare

Next we pointed both at community.cloudflare.com, the Cloudflare page from the benchmark. Each round used a fresh residential IP and three browsers, which waited about 30 seconds for the forum to load. From the second round on, the order was random. The three were:

  • Mozilla Firefox, started with no automation at all
  • stock Playwright Firefox
  • Playwright Firefox with these differences removed: navigator.webdriver hidden, the PDF viewer on, no fixed viewport

Rounds where the proxy itself failed (a certificate warning or a dead connection) were dropped. That left five:

Round Mozilla Firefox Playwright, stock Playwright, patched
1 passed stuck passed
2 stuck stuck stuck
3 passed proxy error stuck
4 stuck stuck stuck
5 stuck stuck stuck

“Stuck” means the browser sat on “Just a moment…” for the whole 30 seconds. Stock Playwright Firefox never got through, and neither did its headless run in round 1. With the differences removed it passed in round 1, headed and headless, but stayed stuck in round 3, where Mozilla’s Firefox passed.

On another IP we tried each change on its own. Hiding navigator.webdriver, turning the PDF viewer on or removing the viewport alone never helped. Pairs that included hiding webdriver passed once each and failed once, and all three together failed twice. That is too few runs to say which change matters most.

What the rounds do show is that on Cloudflare the IP decides first: Mozilla’s own Firefox failed on three of five. In round 1 the JavaScript differences were the only thing between stuck and passed.

Akamai

The Akamai page in the benchmark is mrporter.com. On the server, every Playwright Firefox run that loaded got “Access Denied”. So did Mozilla’s Firefox with no automation: version 153 on three different proxies and 161 on two.

We repeated it on a desktop running Fedora Linux, with a GPU and a normal Wayland session. We opened the distribution’s own Firefox 161 and Chromium with fresh profiles and no automation, through the same residential proxies. In 13 attempts Firefox loaded the Mr Porter home page six times and got “Access Denied” three times. The other four never finished loading. Chromium was turned away on seven of eight, so the IPs were not simply clean. Camoufox, headed on the same desktop, got through on one proxy out of five.

So on this site Playwright is not the problem. A plain Firefox with no automation was blocked every time on the server and passed about half the time on the desktop. The proxies rotate and the samples are small, so we can’t say which part of the server setup Akamai reacts to. The benchmark runs on a server, and there every Firefox-based setup failed Akamai, Camoufox included.

So is Playwright the problem?

On the network, no. Playwright’s Firefox makes the same TLS and HTTP/2 handshake as Mozilla’s Firefox of the same version. The only network tell is that the version is old.

In JavaScript, yes. navigator.webdriver, the missing PDF plugins and the fixed viewport show up in every session, and in one Cloudflare round they were the difference.

For quick tests, these settings remove all of them:

browser = await p.firefox.launch(
    headless=False,
    firefox_user_prefs={"pdfjs.disabled": False},
)
context = await browser.new_context(no_viewport=True)
await context.add_init_script(
    "Object.defineProperty(Navigator.prototype, 'webdriver', {get: () => false})"
)

They didn’t make Playwright Firefox reliable on Cloudflare, and they don’t touch anything deeper that a site might check. Camoufox and invisible-playwright patch Firefox itself and passed Cloudflare in the benchmark. On Akamai, neither they nor plain Firefox got through from our server. To scrape an Akamai site from a server, use one of the Chromium builds that passed it there.