JBrowser Source Docs
You are reading the documentation for JBrowser 1.5.3. The newest release is 1.5.4. Go to the latest documentation

jbrowser.engine.identity

Generated from the source code of JBrowser 1.5.3.

jbrowser/engine/identity.py · 75 lines

The browser JBrowser presents itself as: the current Chrome version, as a Chromium browser.

Qt WebEngine would announce its own Chromium (140 in Qt 6.11) plus a QtWebEngine/x.y token, and a browser a year behind Chrome is treated as outdated or suspicious by some sites. JBrowser presents the newest stable Chrome version instead, consistently everywhere a site can look: the User-Agent header, navigator.userAgent, the Sec-CH-UA client-hint headers and navigator.userAgentData.

The user agent string is exactly Chrome's. The client-hint brands say "Chromium" (plus Chrome's placeholder brand) but not "Google Chrome": Google's sign-in knows a genuine Google Chrome by more than its brand, and rejects a browser that claims the brand without the rest ("Couldn't sign you in").

The version is recorded at build time: tools/chrome_version.py asks Google's version history service for the newest stable Chrome for Windows and rewrites the two constants below, and master.ps1 runs it for every release. A copy of JBrowser that hasn't been updated for a while keeps up by itself: every 30 days after the recorded date it presents the next major version. Chrome ships one every 4 weeks, so the estimate never runs ahead of the real Chrome.

Constants#

Name Value
CHROME_VERSION '155.0.8059.12'
CHROME_VERSION_DATE date(2026, 9, 30)
ESTIMATE_DAYS 30

Functions#

chrome_version#

chrome_version(today: date | None=None) -> strsource

The full Chrome version to present, e.g. "155.0.8059.12".

major#

major(version: str) -> intsource

user_agent#

user_agent(version: str) -> strsource

Chrome's reduced user agent: only the major version is real, the rest is always zero.

grease_brand#

grease_brand(seed: int) -> tuple[str, str]source

The placeholder brand and version Chrome adds for major version seed, e.g. ("Not(A:Brand", "24").

brand_versions#

brand_versions(version: str) -> dict[str, str]source

Brand → full version, as a Chromium browser of this version reports them (Sec-CH-UA-Full-Version-List). No "Google Chrome" brand: see the module notes.

apply#

apply(profile, version: str | None=None) -> strsource

Present version (default: chrome_version()) on a QWebEngineProfile. Returns the user agent.