* Four more pages get the measurement they were describing Each of these pages asserted something a reader has to take on trust. Each one now carries the run that produces it, on one Windows machine, one page served from 127.0.0.1, with the numbers computed inside the page so the figure and the figures agree by construction. Canvas fingerprint changes every run. Four sessions: two without a seed disagree on both readbacks and even on the device pixel ratio, two with the same seed are identical, 0 of 79,800 pixels apart. The drawing looks the same in all four panels, which is the useful part: the eye cannot separate them and the hash can. Running it also contradicted a sentence the page carried, "Different seed, different bytes": two different identity seeds can land on the same hardware seed and return the same readback. The direction that holds is same seed, same bytes, and the text now says only that. Human-like mouse movement. Three ways to reach one target, with the page recording every pointer event. All three report isTrusted true, so the trusted flag does not separate the driver from the engine, only both from page script. What separates them is the deltas: 3 distinct movementX values across 41 events for an evenly stepped driver path, 26 across 34 for the engine's. And the third panel is not a graceful arc, which is this page's whole thesis in one image. Detecting installed fonts by width. The article's own snippet, run over ten families against two different fallbacks. Consolas reads absent against monospace and present against serif on the same machine in the same session, because Consolas is what monospace resolves to there. An invented control family stays absent under both, which is what makes that a finding. The rule now names its exception: an identical width means the candidate did not render, or the candidate is the fallback. Screen size and viewport tells. The taskbar check does not fire on this browser: bundled Firefox headless reports a 48 pixel gap, same as headful. What is a tell is the constant, 1366x768 at two different viewports. Also states a sharp edge of ours: an explicit viewport leaves outerWidth on the declared window while innerWidth follows the request, 1490 pixels of impossible chrome, and no_viewport keeps the pair at a plausible 85. Every PNG was opened and inspected, and carries no metadata chunks and nothing after IEND. * Measure the new_page default instead of describing it The page says browser.new_page() ships Playwright's stock 1280x720, and that the same gap was closed on this engine. Both halves are now run rather than stated. Three headless sessions on one page served from 127.0.0.1. The bundled Firefox opened with new_page() reports inner 1280x720 on a screen it calls 1366x768. The same build asked for new_context(no_viewport=True) reports 1366x683, a window on that screen instead of a number from a config file. The patched engine opened with new_page() reports 1920x947, which is exactly what its own new_context gives, so the convenience call is not picking up a default nobody chose. The first panel carries a second contradiction worth naming on a page about relationships: outerHeight reads 805 while availHeight reads 720, so the window is taller than the space the OS says exists. PNG opened and inspected, no metadata chunks, nothing after IEND. * Thirteen more pages show the values they describe, and the canvas page gets two corrections Each page now carries a card of the values it names, read from a page served from 127.0.0.1 by two headless sessions: Playwright's bundled Firefox and a patched engine. Every card holds that page's own values, so no two are the same table. Eleven pages had at least one value that differs between the two browsers, so those carry both panels. Three had none, and there the card is a single panel with a note that the bundled Firefox returned the same values: a difference that does not exist is not worth two identical tables. Four cards were built and then dropped rather than shipped. Five pages named the same trio of userAgent, platform and oscpu, which would have put the same three-row table on five pages, and two comparison pages would have carried the same two-row table. Kept where that trio is the subject, dropped elsewhere. Three probes are deliberately not in the catalogue because they reveal the host that ran the bench: the unmasked WebGL renderer prints the real GPU, the resolved timeZone and navigator.languages print where the machine is. Measured on this host before they were removed. And the canvas page carries two corrections that came out of running it: Without a seed, what changes on every launch is the device, not necessarily the readback. Five unseeded launches moved the screen between 1920x1080 and 2560x1440, the core count between 4 and 12 and the ratio between 1 and 1.25, and returned the same canvas four times out of five. So two unseeded runs agreeing on a canvas hash is the likely outcome, not evidence that a seed took effect. And hashing toDataURL partly hashes the PNG encoder. Three launches of the bundled Firefox drawing an identical canvas returned three different toDataURL hashes and the same getImageData bytes every time, with privacy.fingerprintingProtection and privacy.resistFingerprinting tested both ways. The cards read getImageData for this reason. All nineteen PNGs opened and inspected, no metadata chunks, nothing after IEND. * Three questions the new measurements answer, in the block that captures them Each of these is a question a reader types and the page could not answer until the bench ran. One per page, and all three different: a block that grew by the same entry on three pages would be padding. Hash getImageData rather than toDataURL when you want to know whether the drawing changed, because three launches of the bundled Firefox returned three data URL hashes and the same pixel bytes. Playwright's Firefox reports 1366x768 with availHeight 720 in headless mode, and it did not move at two different viewports, so it is a constant rather than something derived from the session. And a font the probe calls absent may be the fallback: Consolas reads absent against monospace and present against serif in the same session on Windows. * Shorten the one alt text that ran past four hundred characters Every other figure sits between roughly one hundred and three hundred; this one described four things a screen reader has to hear in one breath. Same content, fewer clauses. * Give seven mute pages their first in-body links linkgraph counted 24 pages in the engine corpus with zero contextual outgoing links and named none of them, so the number had sat there for a month with nobody able to act on it. Named now, they turn out not to be stubs: 620 to 2600 words, six to eleven H2s, with every internal link sitting in the See also footer or the FAQ block, which the graph excludes on purpose because boilerplate is not equity. Seven of them get two or three links each, written for the sentence they sit in: the four net::ERR_* pages point at the siblings that differ only in how far the exchange got, Anubis and Turnstile point at each other on the proof-of-work layer they share, and the CSP page places an init script at the page-JavaScript level of the three. Measured before and after with the tool, on this worktree: 24 to 17. * Eleven more mute pages, and the integrations family had none at all The eight pages under docs/integrations had zero internal markdown links between them: only the directory README pointed in, and nothing pointed out. They are also the pages where a reader arrives having already chosen a tool, which makes them the ones most worth giving a next step. Links are placed on the sentence that raises the subject, and the target differs per page on purpose: eight near-identical pages that all grew the same link in the same section would be the monotemplate signature the checklist warns about, which is the thing the See also block already is. So the user-agent warning points at why one string is the weakest thing to change, Crawlee's fingerprint generator at what a fingerprint is read as, scrapy's SOCKS route at where Playwright drops the credentials, TestCafe's missing prefs column at the seed. One anchor was written before checking the target and described something that page does not cover; it names the layer stack now, which is what the page is actually about. Link form is the corpus convention, [x](slug.md), which build_wiki resolves from a subdirectory through its addressable table. The ../slug.md form would read correctly on github.com and dead on the wiki, which is the surface that ranks. Measured with the tool against this worktree: 17 to 6, median outbound density back to 3.4 per thousand words. * The last six mute pages: the engine corpus is at zero Six troubleshooting and getting-started pages get their first in-body links, and three of them sit next to each other in the error space, so the links say which of the neighbouring errors you would be reading instead: force-clicking through an overlay against the not-attached error, a leaked process against a script still holding a browser that went away, strict mode against a click that is merely covered. Two anchors were written before reading the target and had to be corrected. One claimed a page covered whether content arrives in the HTML, which it does not; it names the layer stack now. One asserted the seed page lists two things it cannot pin, which is not the shape of that section; it points at the section by what it is. An anchor that describes the target wrongly is worse than no link, because a reader follows it once and stops trusting the rest. engine: 24 mute pages to 0, median outbound density 3.4 per thousand words, inside the 2-5 house range. aihawk still has 2, both on the restricted themes, handled separately. * An anchor with an underscore left one dead link on the wiki The link rewriter's anchor class was [A-Za-z0-9-], and a heading like "What invisible_playwright does and does not do here" produces an anchor carrying an underscore. The pattern then fails to match the whole link, not just the anchor, so it shipped to the wiki as ](geetest-v4-explained.md#...) - a dead target, because the wiki has no .md pages. One link across 463 pages, and invisible from either side: the page renders normally and only the destination 404s. Found by building the wiki and grepping the output for links that still end in .md, which is worth doing on any batch that adds internal links. Underscore added to both classes, since a page name can carry one for the same reason a heading can. Rebuilt: the unresolved count goes 1 to 0 and exactly one of the 463 output files differs, so nothing else moved. * The headful panel printed this machine's display, so it comes out The screen figure had four panels and the third was labelled "now it is the host's display". It was: 1365 x 853, the real geometry of the machine the bench ran on, painted into the pixels of a page about to be published. The alt text had carefully avoided the number, so the image was the only place it appeared. That is the class the house rule names by name, and it got through because the exclusion list lives in the probe catalogue, which the value cards go through and a bespoke bench does not. A bench written for one page reaches straight past it. Recomposed from the three headless panels with the harness. The argument survives: the taskbar gap is still 48 px, the screen is still a constant across two viewports, the patched engine still declares 1920x1080. The headful measurement is now stated in prose, with the reason it is not shown, which is the honest version of what that panel was for. Renamed to three-arms, free to do because the URL has never been published. The other four bespoke figures were opened and are clean, and the 114 strings rendered into the fourteen value cards were scanned for IP, host timezone, host locale, GPU model, user paths and machine names: nothing.
4.8 KiB
title, description, parent, nav_order
| title | description | parent | nav_order |
|---|---|---|---|
| Quickstart | Two-line switch from Playwright with zero API changes to learn. Sessions get distinct fingerprints by default; pass a seed for reproducible ones instead. | Documentation | 2 |
Quickstart
100% Playwright-compatible - sync and async, every method, zero API changes beyond how the browser is launched. If you already have Playwright code, switching is two lines:
- from playwright.sync_api import sync_playwright
- with sync_playwright() as p:
- browser = p.firefox.launch()
+ from invisible_playwright import InvisiblePlaywright
+ with InvisiblePlaywright() as browser:
Every session gets a distinct fingerprint (GPU, audio, fonts, screen, roughly 400 fields) and Bezier-curve mouse motion, with no further configuration required.
Sync
The synchronous API, for scripts that already call sync_playwright() directly:
from invisible_playwright import InvisiblePlaywright
with InvisiblePlaywright(proxy={"server": "socks5://gate.example.com:1080", "username": "u", "password": "p"}) as browser:
page = browser.new_page()
page.goto("https://example.com")
page.click("#submit") # mouse arcs to the button on a Bezier curve
Async
The same shape under asyncio, for code that already calls async_playwright():
from invisible_playwright.async_api import InvisiblePlaywright
async with InvisiblePlaywright(proxy={"server": "socks5://gate.example.com:1080", "username": "u", "password": "p"}) as browser:
page = await browser.new_page()
await page.goto("https://example.com")
await page.click("#submit")
The browser object returned is a real playwright.sync_api.Browser /
playwright.async_api.Browser - every Playwright method works exactly as documented
upstream. There is no wrapped subset of the API to learn.
Logging the seed to replay a run
Every session is generated from a seed, whether you pass one or not. Log it and you can reproduce the exact same identity later:
sf = InvisiblePlaywright()
with sf as browser:
print("seed =", sf.seed)
# ...
Reproducible fingerprint
Pass a seed explicitly and every field it implies - GPU, canvas hash, audio context, fonts, screen - comes back identical, run after run:
with InvisiblePlaywright(seed=42) as browser:
... # same GPU, same canvas hash, same audio context, every run
This is the difference between debugging a failure and guessing at one: same seed, same browser, so a failing run can be replayed exactly rather than hoping the next random draw reproduces it. The seed reaches the browser layer and stops there, and what it does not pin is the half worth reading before treating a stable fingerprint as a finished job.
Short answers to the questions that lead here
Do I need to change my Playwright code to use invisible_playwright? No, beyond
the two-line switch above. Every method - sync and async - is the same one you
already call on playwright.sync_api.Browser / playwright.async_api.Browser;
there is no wrapped subset of the API to learn.
Does every session get a different fingerprint automatically? Yes. GPU, audio, fonts, screen and the rest of the roughly 400 fields are generated fresh per session with no configuration required, and each gets Bezier-curve mouse motion by default too.
How do I make a fingerprint reproducible across runs instead of random? Pass
seed= explicitly, or log sf.seed from a seedless run and reuse that value next
time. Either way, every field the seed implies comes back identical.
Is the browser object a real Playwright object, or a wrapper around one? It is
the real thing - playwright.sync_api.Browser or playwright.async_api.Browser -
so anything documented upstream for that object works unchanged here.
Where do I set a proxy, force the timezone, or fix one fingerprint field while leaving the rest random? Configuration covers proxies, timezone and environment variables; Pinning fingerprint fields covers forcing individual values like a GPU model or screen size.
See also: Installation for downloading the patched Firefox binary this class drives, Configuration for proxy and timezone options, Pinning fingerprint fields for forcing specific values while the rest stays seed-derived, and giving an agent a reproducible browser identity for the full seed-reuse pattern this page introduces.
Next
Configuration covers proxies, timezone and environment variables. Pinning fingerprint fields covers forcing specific values - a GPU model, a screen size - while leaving the rest seed-derived.