browser design · lesson 5 of 6 · sources checked 2026-11-20
engine-level change against page-level change
This lesson compares a change in page JavaScript with a change in engine code, by the trace that each leaves and by its upkeep cost.
status of this lesson: from a public sourcepurpose
A defender who finds no trace in the page objects can think that a client changed nothing. But a change can also sit in the code of the browser, where page code cannot examine it. Thus an in-band hook and an out-of-band change must have different checks.
objectives
- Explain why an in-band hook is visible to page code and an out-of-band change is not.
- Name the traces that a native-function test reads.
- Calculate the rebuilds of an engine change for each year from the release cadence.
- Describe why a version lag is a signal.
new terms
- in-band hook
- A change to page-visible JavaScript objects that page code can examine.
- out-of-band change
- A change in engine code that page code cannot examine directly.
- anti-detect browser
- A browser build or product that changes the identity that it shows to a site.
- CDP
- Chrome DevTools Protocol, a JSON message protocol that controls and examines a Chromium browser.
- lie
- A value or function that a detector proves to be patched or false.
- version lag
- The number of milestones between the version that a client claims and the current stable version.
how it works
An anti-detect browser changes the values that a page reads. Each change sits at one of two places:
| place | class of change | what page code can see |
|---|---|---|
| Page JavaScript | In-band hook | The new function and its traces |
| engine code | Out-of-band change | A native function with a changed value |
A third class changes the values through CDP. In my model, this class uses no changed build, but the protocol can leave side effects that a page can see. The reference pages give the details.
the in-band hook
An in-band hook puts a new function or property in the objects of the page. The page can examine the same objects. For example, a script puts a function that returns 0 in place of Date.prototype.getTimezoneOffset.
A native-function test reads three traces of such a hook:
Function.prototype.toStringgives the source text of the hook, not the body[native code]of a built-in function.- The hook has its own
prototypeproperty. A built-in method has none. - The hook can sit as an own property on the instance, not on the prototype.
The code example shows the three traces.
claim of a publisher The README of puppeteer-extra-plugin-stealth states that the plugin "Applies various techniques to make detection of headless puppeteer harder". It also states that it is "probably impossible to prevent all ways to detect headless chromium" berstend, source 1.
the out-of-band change
An out-of-band change is in the engine code. The page reads a native function, and that function gives the changed value. Thus a native-function test finds no trace.
For example, a page calls getTimezoneOffset, and toString gives the body [native code]. But the offset that the call returns is the changed value.
claim of a publisher The Camoufox project states that its Firefox build reports the values from C++, so a page sees native values and not values that JavaScript changed. It also states that Camoufox can still be detected, because many values must agree with each other Camoufox project, source 2.
each changed value must agree
A changed value must agree with each other value that a site reads. A value that a detector proves to be false is a lie. For example, the user-agent header claims a desktop system, and the font set is of a server image.
In 2024, a study of evasive bot traffic found attributes that do not agree in the fingerprints of bots that change their fingerprint. Rules that check this agreement across attributes and over time lowered the evasion rate arXiv, source 3.
Thus each change can add a new trace. An in-band hook adds a trace in the page objects. An out-of-band change can add a trace in a different layer.
the cost of an engine change
An out-of-band change is a patch on the engine code. Each upstream milestone changes that code. Thus the build must rebase the patch and build again for each milestone that it follows. The release cadence sets the rebuilds for each year.
claim of a company In March 2026, Google stated that Chrome moves from a four-week cycle to a two-week cycle. The first release of the new cycle is the stable release of Chrome 153 on September 8, 2026 Google, source 4.
Firefox also moved from a four-week cycle to a two-week cycle. The first release of the new cycle was Firefox 155 on September 1, 2026 Mozilla, source 5.
Thus a build that follows each milestone of either browser now rebuilds two times as often as before. The section "Data" shows the counts for each year.
the version lag
A build that does not follow each milestone shows an old version. The version lag is the number of milestones between the claimed version and the current stable version.
example The current stable version is milestone 160. A client claims milestone 156. Its version lag is 4.
The browser of a real user can update itself after each release. Thus in my model, a large lag puts a client in a small population, and a version lag is a signal. A shorter cycle makes the lag grow faster for a build that stays on one version.
the two sides
| automation side | detection side |
|---|---|
| An engine-level change is harder to see than a page-level hook. But it costs a rebuild after each upstream release, and a two-week cycle doubles that cost. | Each changed value must agree with many other attributes. Native-function and descriptor tests find page-level hooks. A version that lags the current milestone belongs to a small population. |
design decisions
| option | gain | cost | when it is correct |
|---|---|---|---|
| In-band hook | Fast to write, and no build | A native-function test finds it | A lab test of a detector check |
| Out-of-band change | No trace in the page objects | A rebase and a rebuild for each milestone | Research on agreement checks, with a budget for each rebuild |
| No change of values | No lie to find, and no rebuild | The real values of the host show | Each declared client, and each test of the host values |
| Follow each milestone | No version lag | Two times the rebuilds of a four-week cycle | A lab build for a test of a version rule against current browsers |
| Stay on one version | Fewer rebuilds | The version lag grows with each milestone | A short lab test only |
diagram
where a change sits: an in-band hook in page objects, an out-of-band change in engine code
- Page scriptReads the objects, calls toString, and reads the property descriptors.
- Page-visible JavaScript objectsAn in-band hook sits here. It leaves source text, an own prototype property, or an own property on the instance.
- Engine codeAn out-of-band change sits here. The page reads a native function and finds no JavaScript trace.
- Host, network, and transportEach changed value must agree with the values of these layers.
A matrix of three design classes and four columns: detectability, upkeep cost, resource cost, and typical trace. The in-band hook has a high detectability and low costs. The change through CDP has medium values. The out-of-band change has a low detectability in the page objects and high costs.
| design class | detectability | upkeep cost | resource cost | typical trace |
|---|---|---|---|---|
| In-band hook in page JavaScript | High: page code can read it | Low: a script update | Low: no own build | toString, descriptor, prototype |
| Change through CDP | Medium: the protocol can show | Medium: follows the protocol | Low: no own build | Side effects of the protocol |
| Out-of-band change in engine code | Low in the page objects | High: a rebuild per milestone | High: an own build pipeline | Values that do not agree, lag |
release cycle before and after september 2026, and the rebuilds of an engine change
code example
The example applies two synthetic in-band hooks to a built-in method inside the script. It runs the native-function test before and after each hook.
example The hooks are synthetic and change only the script itself. No part describes a real product.
Test a built-in method for the three traces of an in-band hook: source text, an own prototype property, and an own property on the instance.
// Native-function test: find an in-band hook on a built-in function.
// The hook is synthetic. It runs only inside this script.
const nativeToString = Function.prototype.toString;
const proto = Date.prototype as unknown as Record<string, unknown>;
type Report = { looksNative: boolean; hasPrototype: boolean; ownOnInstance: boolean };
function examine(name: string, target: object): Report {
const fn = (target as Record<string, unknown>)[name] as Function;
const text = nativeToString.call(fn);
return {
// A built-in function prints "[native code]" as its body.
looksNative: /\{\s*\[native code\]\s*\}$/.test(text),
// A built-in method has no own "prototype" property. A plain function has one.
hasPrototype: Object.prototype.hasOwnProperty.call(fn, "prototype"),
// A built-in method sits on the prototype, not on the instance.
ownOnInstance: Object.prototype.hasOwnProperty.call(target, name),
};
}
function verdict(r: Report): string {
const traces: string[] = [];
if (!r.looksNative) traces.push("source text in toString");
if (r.hasPrototype) traces.push("own prototype property");
if (r.ownOnInstance) traces.push("own property on the instance");
return traces.length === 0 ? "no trace" : `hook found: ${traces.join(", ")}`;
}
const name = process.argv[2] ?? "getTimezoneOffset";
const d = new Date(0);
console.log(`before: ${verdict(examine(name, d))}`);
// Synthetic in-band hook 1: replace the method on the prototype.
const original = proto[name];
proto[name] = function () {
return 0;
};
console.log(`hook on prototype: ${verdict(examine(name, d))}`);
proto[name] = original;
// Synthetic in-band hook 2: put an arrow function on one instance.
(d as unknown as Record<string, unknown>)[name] = () => 0;
console.log(`hook on instance: ${verdict(examine(name, d))}`);output
One verdict line before the hooks and one line for each hook.
before: no trace
hook on prototype: hook found: source text in toString, own prototype property
hook on instance: hook found: source text in toString, own property on the instanceI ran the code with the Node runtime and the flag --experimental-strip-types, with the argument getTimezoneOffset. The built-in method shows no trace. Each hook shows the source text and one more trace. An arrow function has no own prototype property, thus the second hook shows the instance trace in its place.
data
milestones for each year: a 4-week cycle and a 2-week cycle
status of this figure: from a public source
source: Public release documents of Chrome and Firefox (public source, https://developer.chrome.com/blog/chrome-two-week-release, read 2026-11-12); date 2026-11-12
data table
| release cycle | milestones |
|---|---|
| 4-week cycle | 13 |
| 2-week cycle | 26 |
The chart compares the milestones for each year of the two cycles. Each milestone is one rebuild of an out-of-band change. Thus the upkeep cost of such a change doubles from September 2026.
failure modes
| problem | cause | correction |
|---|---|---|
| The test reports a hook on a function of a real page. | A library of the page put its own function in place of the built-in function. | Record the scripts of the page, and score the hook with other signals. |
The toString test gives no trace, but the function is hooked. | The hook also changed Function.prototype.toString. | Test toString itself, and keep a reference to it before page scripts run. |
| A native-function test finds no trace, but the values of a client cannot all be true. | The change sits in the engine code, not in the page objects. | Compare each value with the host, network, and transport values. Score a value that does not agree as a lie. |
| The cost plan of an engine change is too low. | The plan counts the rebuilds of a four-week cycle. | Count one rebuild for each milestone of the current release cycle. |
| A version rule flags real users. | A real user can also update some time after a release. | Score the version lag with other signals, not alone. |
check questions
Explain why page code can see an in-band hook but cannot see an out-of-band change.
sample answer
An in-band hook replaces a function in the objects of the page, and page code can examine the same objects. An out-of-band change is in the engine code. The page reads a native function, thus it finds no JavaScript trace.
Name the three traces of an in-band hook that a native-function test reads.
sample answer
The source text of the hook in toString, not the body of a native function. An own prototype property on the hook. An own property on the instance, not on the prototype.
A build follows each milestone of a browser with a two-week release cycle. How many rebuilds does it make each year?
- 13
- 52
- 26
- 4
answer
c. 26
A year has 52 weeks. One milestone every 2 weeks gives 26 milestones, and each milestone is one rebuild. A four-week cycle gives 13.
Describe why a version lag is a signal.
sample answer
The browser of a real user can update itself after each release. A client that claims an old milestone can thus belong to a small population. A shorter release cycle makes the lag grow faster for a build that stays on one version.
A build changes a value in the engine code. The page finds no trace with a native-function test. What can a detector still examine?
- If the changed value agrees with the values of the other layers
- The source text of the native function
- The own prototype property of the native function
answer
a. If the changed value agrees with the values of the other layers
An out-of-band change leaves no trace in the page objects. But each changed value must agree with each other value that the site reads.
exercise
exercise Do this task in your own lab, with synthetic data only. Do not send a request to a site.
- Save the code example in an empty folder of your lab.
- Run the code with Node, the flag
--experimental-strip-types, and the argumentgetTimezoneOffset. - Record the three verdict lines.
- Run the code again with the argument
getDay. - Write the traces that each hook leaves.
- Write why the test cannot find an out-of-band change.
sample answer
This sample answer uses the code example only.
Both runs give the same three lines. Before the hooks, the built-in method shows no trace. The hook on the prototype shows source text and an own prototype property. The hook on the instance shows source text and an own property on the instance. The test reads only the objects of the page. An out-of-band change is in the engine code, and the page reads a native function, so the test finds no trace.
sources
- puppeteer-extra-plugin-stealth, berstend, source code, read 2026-11-20
- Camoufox, Camoufox project, source code, read 2026-11-20
- FP-Inconsistent, arXiv, paper, read 2026-11-20
- Get features faster with Chrome's two-week release cycle, Google, article, read 2026-11-20
- Firefox new release cadence and what to expect, Mozilla, article, read 2026-11-20
- My model of the classes of change, of their traces, and of their upkeep cost, 2026-11 (not public).