Skip to content
tomaskavka.dev

botcheck

A dependency-free browser library that looks for bots and automation by checking whether a browser's story about itself adds up.

Experiment 2026.11 DWG-BOTCHECK-001
JavaScriptWebAssemblyAstroCloudflare

The Problem

Most bot detection is a closed box you rent. I wanted to see how far a single readable file can get using only what the browser itself gives away — and where that approach stops working.

The question

How much can a web page learn about its visitor’s browser without a server, a third-party script, or a stored fingerprint?

It started with one detail. Since Chrome 148, Math.tanh(0.8) ends in a different digit on Linux, macOS and Windows, because the engine hands the calculation to the operating system’s math library. A browser running on a Linux server while claiming to be Windows gives itself away with one line of arithmetic.

What I built

One JavaScript file with no dependencies. It runs a set of small checks and gives every finding a weight, instead of treating any single one as proof:

  • Automation markers — navigator.webdriver, Selenium and Playwright leftovers, headless user agents
  • Consistency — the claimed engine, platform and client hints against how the browser really behaves
  • Hardware — the GPU renderer, the sign bit of a hardware NaN, and a 172-byte WebAssembly module that tells x86 from ARM
  • Tampering — native functions that were replaced, and values that change between the page, an iframe and a worker
  • Behaviour — pointers that jump instead of travelling, and typing that is impossibly even

Findings from the same category usually share a cause, so only the strongest one counts in full. The result is a score, a verdict and the list of what stood out.

Try it

The live demo runs the checks on your own browser and shows every value they read. Nothing leaves the page.

Where it stops

Everything runs on a machine the visitor controls, so a determined bot can fake all of it — the aim is to make that expensive. It never sees clients that don’t run JavaScript. And so far it has only been verified on Chrome on Linux; the reference values for other platforms still need real devices.

What I Learned

Markers like navigator.webdriver only catch the lazy bots. The useful signal is contradiction: a user agent that says Windows while Math.tanh rounds the way Linux does, or a value that changes between the page and a worker. The hard part isn't detection, it's calibration — every check needs reference values from real devices before its weight means anything.

Skip copy-paste.

Send this page directly to
Claude, ChatGPT or Perplexity.

Your question and the current page will be prefilled in the selected model.

botcheck Markdown

botcheck [experiment] A dependency-free browser library that looks for bots and automation by checking whether a browser's story about itself adds up. Tech: J