---
title: "Browser Fingerprint Consistency: Auditing TLS, HTTP/2, and JavaScript Signals"
description: "Learn how to audit browser fingerprint consistency across TLS, HTTP/2, and JavaScript. Detect mismatches with Python and Playwright before deploying your scraper."
url: "https://www.scrapingbee.com/blog/browser-fingerprint-consistency/"
canonical: "https://www.scrapingbee.com/blog/browser-fingerprint-consistency/"
date: 2026-11-26
lastmod: 2026-11-26
author: "Ilya Krukowski"
publisher: "ScrapingBee"
---

# Browser Fingerprint Consistency: Auditing TLS, HTTP/2, and JavaScript Signals


Your scraper might send perfectly reasonable HTTP headers and still give itself away through mismatched TLS, HTTP/2, or JavaScript signals. That's where **browser fingerprint consistency** comes in: making sure different parts of your scraping stack don't contradict each other.

In this tutorial, we'll use Python and Playwright to inspect these signals, build our own fingerprint consistency checker, and put it to the test by making Chromium pretend to be Firefox.

![Browser Fingerprint Consistency: Auditing TLS, HTTP/2, and JavaScript Signals](https://www.scrapingbee.com/blog/browser-fingerprint-consistency/cover.png)


## When your scraper contradicts itself

Picture this: you've given your scraper a Chrome `User-Agent`, copied the usual browser headers, and sent your request. The website still throws a challenge at you. You try another proxy, fiddle with a few settings, and get nowhere. What gives?

Well, HTTP headers are only part of what a website can see. Your TLS handshake reveals details about the networking stack making the connection, while HTTP/2 contributes its own clues through connection settings and frame behavior. And if the website runs fingerprinting JavaScript, it can inspect properties such as `navigator.userAgent`, `navigator.platform`, and Client Hints.

Here's where things get interesting. You can tell a Python HTTP client to identify itself as Chrome, but that won't magically give it Chrome's TLS handshake. Or you could launch Chromium through Playwright, change its `User-Agent` to Firefox, and discover that some JavaScript properties still identify it as Chromium.

Neither case guarantees you'll get blocked. Websites don't all use the same detection rules, and a single unusual signal isn't proof of automation. But these mismatches give anti-bot systems something else to work with, even when the HTTP headers look perfectly reasonable.

If you want to dig deeper into how TLS fingerprints work, we've covered that in our [TLS fingerprinting guide with Burp Suite](https://www.scrapingbee.com/blog/tls-fingerprinting-burp-suite/). The question here is what happens when we compare the signals across layers instead of examining each one in isolation.

## What browser fingerprint consistency actually means

There's no single fingerprint that tells a website everything about your browser. Instead, it gets a collection of clues from different layers. Some come directly from the network connection, while others only become available when the browser executes JavaScript.

For our purposes, we can split them into three groups:

| Layer | What it reveals | What might look suspicious |
|---|---|---|
| **TLS** | Cipher suites, extensions, and other details of the ClientHello handshake | A client claiming to be Chrome uses a TLS configuration that differs from a known Chrome baseline |
| **HTTP/2** | Connection settings, flow-control behavior, and frame ordering | The HTTP/2 configuration changes unexpectedly while the claimed browser and environment stay the same |
| **JavaScript and browser APIs** | Properties such as `navigator.userAgent`, `navigator.platform`, and `navigator.userAgentData` | The HTTP headers report one browser or operating system, but JavaScript exposes another |

These layers don't necessarily come from the same software component. For example, a Python HTTP client might imitate Chrome's TLS behavior without running a browser at all. Libraries like `curl_cffi` make this possible, as we explore in our [guide to using curl_cffi for web scraping](https://www.scrapingbee.com/blog/how-to-use-curl-cffi/). But matching one part of Chrome's network behavior doesn't automatically make the rest of the client behave like Chrome.

So, how do we decide whether a fingerprint is consistent?

**We're not looking for one perfect set of values.** Browser updates can change network fingerprints, and different operating systems or configurations can produce different results. Even two requests from the same browser won't necessarily have identical fingerprint hashes.

What matters is whether the signals make sense together. A different JA3 hash isn't automatically a problem, for instance. But if your HTTP headers, JavaScript properties, and network behavior point to incompatible browser configurations, that's worth investigating.

We also need to avoid jumping to conclusions. A missing JavaScript property doesn't necessarily mean someone is hiding it. Some APIs, including [`navigator.userAgentData`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgentData), aren't universally supported. And network fingerprints aren't unique browser identifiers, so we can't reliably identify a browser just by looking at JA4.

> For a real-world example of how different signals can affect bot detection, check out our [investigation into why anti-bot systems flag AI-driven browsers](https://www.scrapingbee.com/blog/bots-blocking-bots-in-llm-driven-browsers/).

The easiest way to make these comparisons useful is to start with a known configuration. We'll capture its network and browser properties, save them as a baseline, and use that reference to investigate changes rather than guessing what each fingerprint should look like.

## Setting up our fingerprint testing environment

We'll use Python and Playwright to launch Chromium, then send it to [tls.peet.ws](https://tls.peet.ws/api/all), a handy diagnostic endpoint that reports the TLS handshake, HTTP/2 settings, and HTTP headers it observes.

No packet captures or complicated proxy setup required. The service returns everything as JSON, and Playwright will let us collect JavaScript properties from the same browser.

### Installing Playwright

You'll need Python and [uv](https://docs.astral.sh/uv/) installed. Let's create a project and add Playwright:

```bash
uv init fingerprint-audit
cd fingerprint-audit
uv add playwright
```

Now install Chromium:

```bash
uv run playwright install chromium
```

We'll use a real browser here rather than trying to imitate one with an HTTP library. That way, we're examining Chromium's actual network behavior instead of whatever TLS and HTTP/2 implementation a separate Python client happens to use.

### Checking our setup

Before digging into fingerprints, let's make sure Chromium can reach our diagnostic endpoint.

Create a file named `probe.py`:

```python
from playwright.sync_api import sync_playwright

URL = "https://tls.peet.ws/api/all"

with sync_playwright() as p:
    browser = p.chromium.launch()

    try:
        page = browser.new_page()
        response = page.goto(URL, wait_until="domcontentloaded")

        if response is None:
            raise RuntimeError("No response received")

        print(f"HTTP status: {response.status}")
    finally:
        browser.close()
```

Run it:

```bash
uv run probe.py
```

If everything works, you'll get:

```
HTTP status: 200
```

That's our first successful request from Chromium.

One detail worth pointing out: we're using `page.goto()`, not Playwright's `page.request.get()`. The latter sends requests through a separate API request context, so it doesn't necessarily produce the same network fingerprint as Chromium itself. Since that's exactly what we're trying to examine, the distinction matters.

## Collecting TLS and HTTP/2 fingerprints

So far, we've only checked whether Chromium can reach our diagnostic endpoint. Now let's look at what the server actually sees during the connection.

The response from `tls.peet.ws/api/all` contains more information than we need, so we'll focus on a few fields:

- `user_agent`: The User-Agent header received by the server.
- `http_version`: The negotiated HTTP protocol.
- `tls.ja3_hash` and `tls.ja4`: Fingerprints derived from the TLS ClientHello.
- `http2.akamai_fingerprint`: A compact representation of HTTP/2 connection characteristics.
- `http2.sent_frames`: HTTP/2 frames observed by the server, including SETTINGS.

We'll extract these values and save them as JSON for later comparisons.

Replace the contents of `probe.py` with:

```python
import json
from pathlib import Path

from playwright.sync_api import sync_playwright

URL = "https://tls.peet.ws/api/all"

with sync_playwright() as p:
    browser = p.chromium.launch()

    try:
        page = browser.new_page()
        response = page.goto(URL, wait_until="domcontentloaded")

        if response is None or not response.ok:
            raise RuntimeError("Failed to fetch fingerprint data")

        data = response.json()
    finally:
        browser.close()

tls = data.get("tls") or {}
http2 = data.get("http2") or {}

# Find the initial HTTP/2 SETTINGS frame, if available.
settings = next(
    (
        frame.get("settings", [])
        for frame in http2.get("sent_frames", [])
        if frame.get("frame_type") == "SETTINGS"
    ),
    [],
)

fingerprint = {
    "user_agent": data.get("user_agent"),
    "http_version": data.get("http_version"),
    "tls": {
        "ja3_hash": tls.get("ja3_hash"),
        "ja4": tls.get("ja4"),
    },
    "http2": {
        "akamai_fingerprint": http2.get("akamai_fingerprint"),
        "settings": settings,
    },
}

Path("network-fingerprint.json").write_text(
    json.dumps(fingerprint, indent=2),
    encoding="utf-8",
)

print(json.dumps(fingerprint, indent=2))
```

Run the script:

```bash
uv run probe.py
```

Here's what I got with headless Chromium 159 on Windows:

```json
{
  "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/159.0.8154.6 Safari/537.36",
  "http_version": "h2",
  "tls": {
    "ja3_hash": "c5ea178f1cd782fb7acc14f7a6892791",
    "ja4": "t13d1516h2_8daaf6152771_806a8c22fdea"
  },
  "http2": {
    "akamai_fingerprint": "1:65536;2:0;4:6291456;6:262144|15663105|0|m,a,s,p",
    "settings": [
      "HEADER_TABLE_SIZE = 65536",
      "ENABLE_PUSH = 0",
      "INITIAL_WINDOW_SIZE = 6291456",
      "MAX_HEADER_LIST_SIZE = 262144"
    ]
  }
}
```

Your values may differ depending on your Chromium version and environment.

### Understanding the results

Let's pick apart a few interesting details.

First, Chromium isn't exactly hiding its headless mode. The User-Agent contains `HeadlessChrome/159.0.8154.6`, making that information available to the server without running any JavaScript. That doesn't indicate a mismatch, but it's certainly something a fingerprinting system can observe.

The `http_version` field reports `h2`, meaning Chromium negotiated HTTP/2. This gives the server access to the client's HTTP/2 connection settings, including the four SETTINGS values in our output.

These parameters control features such as header compression and flow control. Their values and ordering can differ between HTTP clients, making them useful fingerprinting signals.

The `akamai_fingerprint` combines several of these characteristics, along with flow-control and frame-related information, into a single string. We'll use it later to check whether our browser's HTTP/2 behavior changes.

Now take a look at the beginning of our JA4 fingerprint: `t13d1516h2`.

We can already learn quite a bit from those characters:

- `t`: TLS over TCP.
- `13`: TLS 1.3.
- `d`: A domain name was included in the Server Name Indication (SNI).
- `15`: The ClientHello advertised 15 cipher suites.
- `16`: The ClientHello contained 16 extensions.
- `h2`: HTTP/2 was advertised through ALPN.

The remaining parts of JA4 summarize other characteristics of the TLS handshake.

For now, the useful thing is that we've captured both TLS and HTTP/2 fingerprints from a known Chromium configuration. We can compare them with later requests to see what changes and what stays the same.

One caveat: if your connection negotiates HTTP/1.1 instead, the HTTP/2 fields may be missing. That's expected, and our script will simply record an empty SETTINGS list.

## Inspecting JavaScript and browser signals

We've captured Chromium's network fingerprints. Now let's check what the browser reveals to JavaScript running on the page.

Fingerprinting scripts can inspect properties exposed through the `navigator` object, including browser identity, operating system, and language preferences. Chromium also provides the User-Agent Client Hints API, which gives us another way to examine its identity.

We'll collect the following properties:

| Property | What it tells us |
|---|---|
| `navigator.userAgent` | The browser identity reported to JavaScript |
| `navigator.platform` | The browser's platform identifier |
| `navigator.language` | The preferred language |
| `navigator.languages` | The list of preferred languages |
| `navigator.userAgentData` | Browser brands, versions, platform, and mobile-device information |
| `navigator.webdriver` | Whether the browser reports being controlled by automation |

The `webdriver` property is particularly interesting. Playwright-controlled Chromium typically reports `true`, making it easy for websites to recognize automation. That doesn't necessarily mean any of its fingerprints contradict one another, though.

### Collecting browser properties with Playwright

We can collect everything with Playwright's `page.evaluate()`, which runs JavaScript inside the browser and returns the result to Python.

Let's update `probe.py` one more time:

```python
import json
from pathlib import Path

from playwright.sync_api import sync_playwright

URL = "https://tls.peet.ws/api/all"

with sync_playwright() as p:
    browser = p.chromium.launch()

    try:
        page = browser.new_page()
        response = page.goto(URL, wait_until="domcontentloaded")

        if response is None or not response.ok:
            raise RuntimeError("Failed to fetch fingerprint data")

        data = response.json()

        # Collect JavaScript properties from the same browser page.
        browser_data = page.evaluate(
            """() => {
                const uaData = navigator.userAgentData;

                return {
                    user_agent: navigator.userAgent,
                    platform: navigator.platform,
                    language: navigator.language,
                    languages: [...navigator.languages],
                    webdriver: navigator.webdriver,
                    // Client Hints may not be supported.
                    user_agent_data: uaData ? {
                        brands: uaData.brands,
                        mobile: uaData.mobile,
                        platform: uaData.platform
                    } : null
                };
            }"""
        )
    finally:
        browser.close()

tls = data.get("tls") or {}
http2 = data.get("http2") or {}

# Extract HTTP/2 SETTINGS, if available.
settings = next(
    (
        frame.get("settings", [])
        for frame in http2.get("sent_frames", [])
        if frame.get("frame_type") == "SETTINGS"
    ),
    [],
)

fingerprint = {
    "network": {
        "user_agent": data.get("user_agent"),
        "http_version": data.get("http_version"),
        "tls": {
            "ja3_hash": tls.get("ja3_hash"),
            "ja4": tls.get("ja4"),
        },
        "http2": {
            "akamai_fingerprint": http2.get("akamai_fingerprint"),
            "settings": settings,
        },
    },
    "browser": browser_data,
}

Path("fingerprint.json").write_text(
    json.dumps(fingerprint, indent=2),
    encoding="utf-8",
)

print(json.dumps(fingerprint, indent=2))
```

The network collection code remains largely unchanged. We've added the JavaScript evaluation and grouped everything under two keys: `network` and `browser`.

Run the script:

```bash
uv run probe.py
```

The result is saved to `fingerprint.json`. Here's an excerpt from the `browser` object in my Chromium 159 test:

```json
{
  "platform": "Win32",
  "language": "en-US",
  "languages": ["en-US"],
  "webdriver": true,
  "user_agent_data": {
    "brands": [
      {"brand": "HeadlessChrome", "version": "159"},
      {"brand": "Not/A)Brand", "version": "8"},
      {"brand": "Chromium", "version": "159"}
    ],
    "mobile": false,
    "platform": "Windows"
  }
}
```

### Comparing the results

Let's see what we've got.

First, `browser.user_agent` matches the HTTP User-Agent from our earlier network capture. Both identify HeadlessChrome 159 on Windows.

The platform values aren't identical, though. `navigator.platform` returns `Win32`, while `navigator.userAgentData.platform` returns `Windows`. That's perfectly normal: both refer to the same operating system, so our checker will need to account for different naming conventions.

Then there's this curious entry in the browser brands:

```
Not/A)Brand
```

That's a GREASE brand, deliberately included by Chromium to discourage websites from depending on fixed brand lists or ordering. It's not another installed browser, and we can safely ignore it when comparing recognized browser brands.

We also have `webdriver: true`, confirming that Chromium reports being controlled by automation. Useful information, but not something we'll flag as a consistency error.

Finally, remember that [`navigator.userAgentData`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgentData) isn't available in every browser. Our script returns `null` when the API is missing, allowing the checker to skip comparisons it can't reliably make.

### What about DOM fingerprints?

We're only scratching the surface of JavaScript fingerprinting. Websites can also inspect Canvas and WebGL rendering, screen dimensions, fonts, and other browser capabilities.

If you're curious how far these techniques can go, our [CreepJS browser fingerprinting guide](https://www.scrapingbee.com/blog/creepjs-browser-fingerprinting/) explores them in more detail.

For our checker, the properties we've collected are enough to start. We have the network fingerprints, the browser's JavaScript identity, and several values we can compare without guessing what a browser should look like.

## Building a fingerprint consistency checker

We now have TLS, HTTP/2, and JavaScript data in `fingerprint.json`. We could inspect everything manually, but doing that after every browser update would get old pretty quickly.

Let's write a Python checker that does the comparisons for us.

Rather than trying to match every value against a fixed browser fingerprint, we'll focus on a few practical questions: Do the HTTP and JavaScript User-Agents agree? Are the reported platforms compatible? Does the Chromium version match what Client Hints tell us?

We'll also add support for comparing network fingerprints against a saved baseline. That'll be useful when we start messing with the browser's identity.

### Writing the checker

Create `audit.py` alongside `probe.py`:

```python
import argparse
import json
import re
from pathlib import Path


def browser_family(user_agent):
    if "Firefox/" in user_agent:
        return "Firefox"

    if any(name in user_agent for name in (
        "HeadlessChrome/", "Chrome/", "Chromium/", "Edg/"
    )):
        return "Chromium"

    return None


def platform_name(value):
    """Normalize common platform identifiers for comparison."""
    value = (value or "").lower()

    if "windows" in value or value.startswith("win"):
        return "Windows"
    if "android" in value:
        return "Android"
    if "iphone" in value or "ipad" in value or "ios" in value:
        return "iOS"
    if "mac" in value:
        return "macOS"
    if "linux" in value or "x11" in value:
        return "Linux"

    return None


def audit(current, baseline=None):
    network = current.get("network", {})
    browser = current.get("browser", {})
    hints = browser.get("user_agent_data") or {}

    ua = network.get("user_agent") or ""
    js_ua = browser.get("user_agent") or ""
    results = []

    def record(level, message):
        results.append((level, message))

    # Check whether HTTP and JavaScript report the same User-Agent.
    if ua and js_ua:
        matches = ua == js_ua
        record(
            "PASS" if matches else "WARN",
            "HTTP and JavaScript User-Agents match"
            if matches else "HTTP and JavaScript User-Agents differ",
        )
    else:
        record("INFO", "User-Agent missing from one of the layers")

    # Treat identifiers such as Win32 and Windows as equivalent.
    platforms = [
        platform_name(ua),
        platform_name(browser.get("platform")),
        platform_name(hints.get("platform")),
    ]
    platforms = [p for p in platforms if p]

    if len(platforms) >= 2:
        matches = len(set(platforms)) == 1
        record(
            "PASS" if matches else "WARN",
            "Reported platforms agree"
            if matches else f"Platform mismatch: {', '.join(platforms)}",
        )

    # Look for Chromium brands without relying on GREASE entries.
    brands = hints.get("brands") or []
    has_chromium_brand = any(
        "Chromium" in item.get("brand", "")
        or "Chrome" in item.get("brand", "")
        for item in brands
    )

    family = browser_family(ua)

    if family == "Firefox" and has_chromium_brand:
        record(
            "WARN",
            "User-Agent claims Firefox, but Client Hints identify Chromium",
        )
    elif family == "Chromium" and has_chromium_brand:
        record("PASS", "User-Agent family agrees with Client Hints")
    elif hints:
        record("INFO", "Browser family could not be checked reliably")

    # Check the Chromium major version against Client Hints.
    if family == "Chromium":
        match = re.search(
            r"(?:HeadlessChrome|Chrome|Chromium|Edg)/(\d+)", ua
        )
        chromium_versions = {
            item.get("version")
            for item in brands
            if item.get("brand") in ("Chromium", "HeadlessChrome")
        }

        if match and chromium_versions:
            major = match.group(1)
            matches = major in chromium_versions
            record(
                "PASS" if matches else "WARN",
                f"Chromium major version "
                f"{'matches' if matches else 'differs from'} "
                f"Client Hints ({major})",
            )

    # Check whether HTTP/2 details were captured.
    http2 = network.get("http2") or {}

    if network.get("http_version") == "h2":
        if http2.get("akamai_fingerprint") and http2.get("settings"):
            record(
                "PASS",
                "HTTP/2 negotiated and fingerprint details captured",
            )
        else:
            record(
                "INFO",
                "HTTP/2 negotiated, but some diagnostic fields are missing",
            )

    if network.get("tls", {}).get("ja4"):
        record(
            "INFO",
            "JA4 captured; browser family cannot be inferred from it alone",
        )

    if browser.get("webdriver") is True:
        record(
            "INFO",
            "Browser reports automation via navigator.webdriver",
        )

    # Check for an identity change without a matching network change.
    if baseline:
        base_network = baseline.get("network", {})
        base_family = browser_family(
            base_network.get("user_agent") or ""
        )

        if base_family and family and base_family != family:
            ja4 = network.get("tls", {}).get("ja4")
            h2 = http2.get("akamai_fingerprint")

            tls_same = bool(ja4) and (
                ja4 == base_network.get("tls", {}).get("ja4")
            )
            h2_same = bool(h2) and (
                h2 == (base_network.get("http2") or {}).get(
                    "akamai_fingerprint"
                )
            )

            if tls_same and h2_same:
                record(
                    "WARN",
                    f"User-Agent changed from {base_family} to "
                    f"{family}, while JA4 and HTTP/2 fingerprints "
                    f"still match the {base_family} baseline",
                )
            else:
                record(
                    "INFO",
                    "Browser family changed, but network fingerprints "
                    "do not both match the baseline",
                )

    for level, message in results:
        print(f"[{level}] {message}")

    warnings = sum(level == "WARN" for level, _ in results)
    print(f"\nWarnings: {warnings}")


if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("--baseline", type=Path)
    args = parser.parse_args()

    current = json.loads(
        Path("fingerprint.json").read_text(encoding="utf-8")
    )

    baseline = (
        json.loads(args.baseline.read_text(encoding="utf-8"))
        if args.baseline else None
    )

    audit(current, baseline)
```

It's a fairly long script, but the logic is straightforward. The two helper functions identify common browser families and normalize platform names, while `audit()` handles the actual comparisons.

Each check produces one of three results:

- `PASS`: The values agree according to our check.
- `WARN`: We've found a potential contradiction.
- `INFO`: Something worth knowing, but not necessarily a problem.

The baseline comparison is deliberately narrow. It checks whether the claimed browser family changed while both JA4 and the HTTP/2 Akamai fingerprint remained identical to an earlier capture. We'll add more checks later, but this is enough for our first experiment.

### Running the audit

Let's give it our original Chromium fingerprint:

```bash
uv run audit.py
```

Here's what I got:

```
[PASS] HTTP and JavaScript User-Agents match
[PASS] Reported platforms agree
[PASS] User-Agent family agrees with Client Hints
[PASS] Chromium major version matches Client Hints (159)
[PASS] HTTP/2 negotiated and fingerprint details captured
[INFO] JA4 captured; browser family cannot be inferred from it alone
[INFO] Browser reports automation via navigator.webdriver

Warnings: 0
```

Five successful checks and no warnings. Our HTTP and JavaScript User-Agents agree, the platform identifiers are compatible, and Chromium reports the same major version through its User-Agent and Client Hints.

The two informational messages are expected. We've captured a JA4 fingerprint, and Chromium reports that it's running under automation. Neither is a contradiction.

Of course, this doesn't mean we've built an undetectable browser. It just means our checks haven't found anything inconsistent in this capture.

### Saving a reference fingerprint

Before changing the browser configuration, let's save the current results as `baseline.json`.

On Windows PowerShell:

```powershell
Copy-Item fingerprint.json baseline.json
```

On macOS or Linux:

```bash
cp fingerprint.json baseline.json
```

Now we can run the checker with a reference:

```bash
uv run audit.py --baseline baseline.json
```

Since both files currently contain the same data, we should still get zero warnings.

Keep `baseline.json` unchanged for the next experiment. We're about to make Chromium pretend to be Firefox, and having a record of its original network behavior will help us see what the User-Agent override actually changes.

## Breaking our fingerprint on purpose

Our checker found nothing suspicious in the original Chromium setup. Fair enough. Let's give it a challenge: make Chromium pretend to be Firefox and see what happens.

We'll change the browser's reported identity without touching its underlying networking stack. That should give our checker something to complain about.

### Spoofing the User-Agent

We already have our original Chromium fingerprint saved in `baseline.json`, so let's open `probe.py` and replace:

```python
page = browser.new_page()
```

With:

```python
page = browser.new_page(
    user_agent=(
        "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) "
        "Gecko/20100101 Firefox/140.0"
    )
)
```

That's it. We're still running Chromium, but Playwright will now use a Firefox 140 User-Agent.

Run the probe again:

```bash
uv run probe.py
```

In my test, both the HTTP and JavaScript User-Agents switched to Firefox 140. However, `navigator.userAgentData` had other ideas:

```json
{
  "brands": [
    {
      "brand": "HeadlessChrome",
      "version": "159"
    },
    {
      "brand": "Not/A)Brand",
      "version": "8"
    },
    {
      "brand": "Chromium",
      "version": "159"
    }
  ],
  "mobile": false,
  "platform": "Windows"
}
```

Caught you! The User-Agent claims Firefox 140, but Client Hints still identify Chromium 159. There's our first mismatch, and we haven't even looked at the network fingerprints yet.

### Checking the network fingerprints

Let's compare our original capture with the new one:

| Signal | Original Chromium | Spoofed Firefox |
|---|---|---|
| User-Agent | HeadlessChrome 159 | Firefox 140 |
| HTTP version | `h2` | `h2` |
| JA3 hash | `c5ea178f...` | `f568ef16...` |
| JA4 | `t13d1516h2_8daaf6152771_...` | Same |
| HTTP/2 Akamai fingerprint | `1:65536;2:0;4:6291456;...` | Same |

The JA3 hash changed, but that doesn't necessarily mean our TLS implementation changed. Chromium randomizes TLS extension ordering, which can produce different JA3 hashes between requests. JA4 is less sensitive to this behavior.

And sure enough, **both JA4 and the HTTP/2 Akamai fingerprint remained identical to our original Chromium capture**. Changing the User-Agent didn't change those network characteristics.

We can't identify a browser from these fingerprints alone. But since we know the original capture came from Chromium, the unchanged network profile gives us another clue that the Firefox identity is only superficial.

### Running the consistency checker

Time to see whether `audit.py` catches the problem:

```bash
uv run audit.py --baseline baseline.json
```

Here's the output from my test:

```
[PASS] HTTP and JavaScript User-Agents match
[PASS] Reported platforms agree
[WARN] User-Agent claims Firefox, but Client Hints identify Chromium
[PASS] HTTP/2 negotiated and fingerprint details captured
[INFO] JA4 captured; browser family cannot be inferred from it alone
[INFO] Browser reports automation via navigator.webdriver
[WARN] User-Agent changed from Chromium to Firefox, while JA4 and HTTP/2 fingerprints still match the Chromium baseline

Warnings: 2
```

Nice! Two warnings, each coming from a different comparison.

The first catches the disagreement between Firefox in the User-Agent and Chromium in JavaScript Client Hints. The second notices that the browser family has changed while JA4 and HTTP/2 still match our known Chromium baseline.

But look at the first line: **HTTP and JavaScript User-Agents match**. That check passes because both values say Firefox. If we'd only compared those strings, everything would have looked fine.

Of course, we haven't tested whether this setup would get blocked by a real website. What we've shown is that our checker can catch two inconsistencies in a controlled experiment, without guessing which headers to change or fighting an anti-bot system.

Before moving on, restore `page = browser.new_page()` in `probe.py`.

## Extending our checker with Client Hints and fingerprint drift detection

Our Firefox experiment worked, but our checker still has a couple of blind spots. We haven't compared the Client Hints sent over HTTP with their JavaScript counterparts, and we can't detect changes in TLS or HTTP/2 fingerprints unless the claimed browser family changes.

Let's add those checks. We'll also make the script a little more useful for automated testing.

### Comparing HTTP Client Hints with JavaScript

We've already used `http2.sent_frames` to extract HTTP/2 SETTINGS. The diagnostic endpoint also returns HEADERS frames containing the request headers received by the server.

In our Chromium 159 test, those headers included:

```
sec-ch-ua: "HeadlessChrome";v="159", "Not/A)Brand";v="8", "Chromium";v="159"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Windows"
```

These give us three more values to compare with `navigator.userAgentData`: browser brands, mobile-device information, and the operating system.

Open `probe.py` and add the following code immediately after the HTTP/2 SETTINGS extraction:

```python
# Extract Client Hints from the HTTP/2 HEADERS frame.
client_hints = {}

for frame in http2.get("sent_frames", []):
    if frame.get("frame_type") != "HEADERS":
        continue

    for header in frame.get("headers", []):
        name, sep, value = header.partition(":")

        if sep and name.lower() in (
            "sec-ch-ua",
            "sec-ch-ua-mobile",
            "sec-ch-ua-platform",
        ):
            client_hints[name.lower()] = value.strip()

    break
```

The code looks for the first HEADERS frame, splits each header into its name and value, and keeps only the three Client Hints we're interested in.

Next, add the following entry to the `network` dictionary in our `fingerprint` object, right after `user_agent`:

```python
"client_hints": client_hints,
```

That's all we need to change in `probe.py`. Now let's teach the checker to use these values.

First, add this helper to `audit.py`, below `platform_name()`:

```python
def relevant_brands(pairs):
    """Keep recognizable Chromium brands and ignore GREASE entries."""
    known = {
        "Chromium",
        "HeadlessChrome",
        "Google Chrome",
        "Microsoft Edge",
    }
    return {(name, version) for name, version in pairs if name in known}
```

It filters out the GREASE brand and lets us compare recognizable browser brands without worrying about their order.

Next, inside `audit()`, add the following block after the existing Chromium major-version check, **at the same indentation level as `if family == "Chromium":`**, not inside it:

```python
    # Compare HTTP Client Hints with navigator.userAgentData.
    http_hints = network.get("client_hints") or {}

    if not http_hints or not hints:
        record("INFO", "HTTP or JavaScript Client Hints unavailable")
    else:
        http_platform = http_hints.get("sec-ch-ua-platform")

        if http_platform is not None and hints.get("platform") is not None:
            matches = http_platform.strip('"') == hints["platform"]
            record(
                "PASS" if matches else "WARN",
                "HTTP and JavaScript Client Hint platforms match"
                if matches else "HTTP and JavaScript Client Hint platforms differ",
            )

        http_mobile = http_hints.get("sec-ch-ua-mobile")

        if http_mobile in ("?0", "?1") and isinstance(hints.get("mobile"), bool):
            matches = (http_mobile == "?1") == hints["mobile"]
            record(
                "PASS" if matches else "WARN",
                "HTTP and JavaScript mobile indicators match"
                if matches else "HTTP and JavaScript mobile indicators differ",
            )

        http_ua = http_hints.get("sec-ch-ua")

        if http_ua:
            # Parse brands and versions regardless of their order.
            http_brands = relevant_brands(
                re.findall(r'"([^"]+)";v="([^"]+)"', http_ua)
            )
            js_brands = relevant_brands(
                (item.get("brand"), item.get("version"))
                for item in hints.get("brands", [])
            )

            if http_brands and js_brands:
                matches = http_brands == js_brands
                record(
                    "PASS" if matches else "WARN",
                    "HTTP and JavaScript browser brands match"
                    if matches else "HTTP and JavaScript browser brands differ",
                )
```

We're comparing the platform, mobile indicator, and browser brands independently. If the necessary information isn't available, the checker skips that comparison rather than declaring a mismatch.

And because this code runs regardless of the claimed browser family, it'll still work when we make Chromium pretend to be Firefox.

### Detecting fingerprint drift

Our original baseline check catches a browser identity change when JA4 and HTTP/2 stay the same. But what if the browser identity stays the same while those network fingerprints change?

That could happen after a browser update, for example. It doesn't necessarily indicate a problem, but we'd still like to know about it.

Inside `audit()`, just before the loop that prints the results, add:

```python
    # Report network fingerprint changes independently of browser identity.
    if baseline:
        old_network = baseline.get("network", {})

        comparisons = (
            (
                "JA4",
                network.get("tls", {}).get("ja4"),
                (old_network.get("tls") or {}).get("ja4"),
            ),
            (
                "HTTP/2 fingerprint",
                http2.get("akamai_fingerprint"),
                (old_network.get("http2") or {}).get("akamai_fingerprint"),
            ),
        )

        for name, current_value, old_value in comparisons:
            if current_value and old_value and current_value != old_value:
                record("INFO", f"{name} changed from baseline")
```

This check runs whenever we supply a baseline, even if the User-Agent hasn't changed.

Notice that it produces `INFO` messages rather than warnings. A different JA4 or HTTP/2 fingerprint might simply reflect a legitimate update, so we'll leave it up to the developer to investigate the change.

### Testing the extended checker

Let's return to our original Chromium configuration. Make sure you've removed the Firefox User-Agent override from `probe.py`, and run:

```bash
uv run probe.py
uv run audit.py --baseline baseline.json
```

In my Windows test with headless Chromium 159, all eight checks passed with zero warnings.

The three new comparisons produced:

```
[PASS] HTTP and JavaScript Client Hint platforms match
[PASS] HTTP and JavaScript mobile indicators match
[PASS] HTTP and JavaScript browser brands match
```

The HTTP headers and JavaScript properties agreed on Chromium 159, Windows, and the desktop configuration.

Our JA4 and HTTP/2 Akamai fingerprint also remained identical to the original baseline, so the drift detection had nothing to report. That's the expected behavior: no change, no drift message.

We now have additional checks that can catch disagreements between server-observed Client Hints and JavaScript properties, plus a way to notice changes in network fingerprints between captures.

### Bonus: failing a CI job when warnings appear

One last improvement. Our current checker prints warnings but exits successfully even when something looks wrong. That's not particularly helpful if we want to run it in CI.

Fortunately, the fix is small.

At the end of the `audit()` function, immediately after printing the warning count, add:

```python
    return warnings
```

Then add a new argument to the existing `argparse` setup:

```python
    parser.add_argument("--fail-on-warn", action="store_true")
```

Finally, replace the last line of `audit.py` with:

```python
    warning_count = audit(current, baseline)

    if args.fail_on_warn and warning_count:
        raise SystemExit(1)
```

Now we can run:

```bash
uv run audit.py --baseline baseline.json --fail-on-warn
```

If any check produces a `WARN`, the script exits with code `1`, which can fail a CI job. Informational messages, including fingerprint drift, won't cause a failure.

Our checker still isn't a complete fingerprinting engine, but it now covers more than our original Firefox experiment. We can check browser identity across HTTP and JavaScript, spot changes in network fingerprints, and automate basic consistency checks without much additional infrastructure.

## Keeping fingerprints consistent in production

Our Firefox experiment was easy to diagnose because we knew exactly what we'd changed. In a real scraping project, things aren't always so obvious. A Playwright upgrade, a new HTTP client, or a change in the execution environment can affect browser fingerprints without anyone intentionally modifying them.

The trick is to keep your setup reproducible and investigate unexpected changes rather than trying to preserve every fingerprint value forever.

### Keep your browser environment reproducible

Playwright uses browser binaries tied to specific library versions. Upgrade Playwright, and you may need a newer Chromium build as well.

Our project uses `uv.lock` to record the resolved Python dependencies. To restore those versions and install the corresponding Chromium binary, run:

```bash
uv sync --frozen
uv run playwright install chromium
```

For Linux CI environments, you can also install the browser's system dependencies with:

```bash
uv run playwright install --with-deps chromium
```

Beyond Python dependencies, keep track of the browser version, operating system, launch arguments, and any custom User-Agent or Client Hints settings. The lockfile won't capture all of those details, but they're handy when investigating why two environments produce different fingerprints.

### Keep separate baselines for different configurations

Our `baseline.json` captures one particular setup: headless Chromium 159 on Windows. Comparing it against Firefox on Linux wouldn't tell us much without accounting for those differences.

If you use multiple browser versions, operating systems, or headless and headed configurations, keep separate baselines for each. Record the environment details and capture date alongside the fingerprint data, so you know exactly what you're comparing.

And don't automatically overwrite a baseline whenever something changes. Review the differences first. Otherwise, you could accidentally make a broken configuration your new reference.

### Monitor changes without chasing every hash

Our extended checker already reports JA4 and HTTP/2 fingerprint changes relative to a baseline. That's useful for spotting unexpected differences after an update, but remember that these changes produce `INFO` messages rather than warnings.

For example, suppose you upgrade Chromium and the checker reports:

```
[INFO] JA4 changed from baseline
[INFO] HTTP/2 fingerprint changed from baseline
```

That's a reason to investigate, not immediately roll back the deployment. Check whether the browser version or networking environment changed, and whether the other identity signals still agree.

It's also worth keeping your test conditions comparable. If a proxy terminates TLS or an intermediary modifies the connection, the diagnostic server may observe something different from a direct browser connection.

### Run consistency checks before deployment

You don't need to inspect the fingerprint of every page you scrape. Instead, run the audit when you upgrade browser dependencies, change network settings, move to a new environment, or start seeing unexpected blocks.

We can also use our existing scripts in a CI job:

```bash
uv run probe.py
uv run audit.py --baseline baseline.json --fail-on-warn
```

The first command captures a fresh fingerprint. The second compares it with our approved baseline and exits with code `1` if any check reports a `WARN`.

There are two things to keep in mind, though. Our drift checks currently report changes to JA4 and the HTTP/2 Akamai fingerprint as informational messages, so those changes alone won't fail the job. Also, the probe depends on an external diagnostic endpoint, which means network failures can interrupt the test.

For a more advanced setup, you could add browser-version checks, store fingerprint reports as CI artifacts, and decide which changes should require manual review.

That's already a useful foundation for catching configuration mistakes before deployment. And if maintaining browsers, proxies, and the surrounding scraping infrastructure starts taking more time than extracting data, it might be worth letting a managed service handle some of that work.

## When fingerprint consistency isn't enough

Your checker reports zero warnings, but the website still serves you a CAPTCHA. Annoying, sure, but not particularly surprising. Fingerprints are just one part of bot detection. IP reputation, request frequency, browsing patterns, and session behavior can all influence whether your scraper gets through.

If you're running into these issues, our [guide to web scraping without getting blocked](https://www.scrapingbee.com/blog/web-scraping-without-getting-blocked/) covers other detection methods and practical ways to handle them.

Of course, you don't have to manage the entire scraping infrastructure yourself. [ScrapingBee](https://www.scrapingbee.com/) takes care of proxy rotation, JavaScript rendering, and browser-based scraping, so you can spend less time troubleshooting blocked requests and more time working with the data.

Want to try it? [Sign up for free](https://www.scrapingbee.com/) and get **1,000 free API credits with no credit card required**. You can test the API on your own projects before committing to a paid plan.

## Conclusion

Changing a browser's User-Agent is easy. Making sure its TLS, HTTP/2, and JavaScript signals agree takes a bit more work, as our Firefox experiment demonstrated.

We started by capturing Chromium's fingerprints, then built a Python checker that caught two inconsistencies when we changed its reported identity. We also extended it to compare HTTP Client Hints with JavaScript, monitor network fingerprint changes, and support automated checks in CI.

The result is a handy little tool for investigating your scraper's behavior and catching configuration mistakes. It's not a complete anti-bot testing solution, but it's a good foundation you can build on as your scraping projects grow.

## Frequently asked questions

### What is browser fingerprint consistency?

Browser fingerprint consistency means that signals from TLS, HTTP/2, HTTP headers, and JavaScript APIs don't contradict one another. Websites can use these signals together to identify suspicious clients.

### How can I check browser fingerprint consistency?

You can use a diagnostic endpoint to inspect TLS and HTTP/2 fingerprints, then collect JavaScript properties with Playwright. Comparing these signals against each other and a known browser baseline can help identify mismatches.

### Does changing the User-Agent affect TLS and HTTP/2 fingerprints?

No. Changing the User-Agent header doesn't automatically modify the TLS handshake or HTTP/2 configuration. Your scraper may claim to be Chrome or Firefox while retaining the network characteristics of a different HTTP client.

### Can JA4 identify a browser or detect fingerprint mismatches?

JA4 describes characteristics of a TLS connection, but it doesn't uniquely identify a browser. Comparing JA4 values against a known baseline can help investigate changes, especially when combined with HTTP/2 and JavaScript signals.

### Can Playwright still get blocked with a consistent fingerprint?

Yes. Websites can detect Playwright automation through JavaScript properties, behavioral signals, IP reputation, and request patterns. Consistent fingerprints reduce certain contradictions but don't guarantee that a scraper will avoid detection.
