Skip to content
All fingerprint checks
Automation surface

history.replaceState to another origin throws SecurityError

Pim· Clearcote Research 1 min readCheck id history-replacestate-cross-origin-throws

replaceState to another origin throws a DOMException named SecurityError. N/A when no frame can be created (severity: warn).

What a detector infers

history.replaceState may change the URL shown for a document only within its own origin; the HTML standard requires a SecurityError for any URL that would put another origin in the address bar. Every browser enforces it, because a page able to rewrite its URL to another site could impersonate that site. An emulated History — jsdom's, a test double, or a wrapper that records calls instead of passing them to the browser — tends to store the URL and return.

The row calls replaceState with https://example.org/ on the history of a fresh hidden frame, so the audit page's own URL is never touched. A widely deployed CAPTCHA's challenge script makes the same call. Measured on 2026-10-28: SecurityError in Google Chrome 154–156, Chromium 153 and Clearcote r52.

How to resolve it

Leave History to the browser. Wrapping it for instrumentation has to keep the browser's own checks, including this one.

Spec invariants as lie detectors

Nearby checks in Automation surface

See all 57 checks in Automation surface
Who builds this test

Clearcote is a browser built for fingerprint coherence

It is a Chromium fork, maintained by the same people who wrote this reference. It ships as a compiled browser rather than as a stealth script injected into someone else's — which is a description of how it is built, and is not an argument about how it behaves on this check.

This audit takes no position on how Clearcote scores on Automation surface checks, on this one, or anywhere else. It has no baseline corpus of other people's fingerprints to rank you against and no vendor scoreboard — nearly every check is self-referential, asking one browser the same question through two independent APIs and reporting whether both answers can be true at once. It runs identically on any browser, including ours. Run it on yours and read the result yourself.

See the other checks in Automation surface — the family history-replacestate-cross-origin-throws belongs to.