Skip to main content

parse_chrome_version

Function parse_chrome_version 

Source
pub fn parse_chrome_version(ua: &str) -> Option<Vec<u16>>
Expand description

Extract the Chromium version parts from a UA string (... Chrome/146.0.7444.60 ...).

Used to pin a persona to the binary that is actually running. The UA is the only part of a version claim we control: detectors feature-detect the build — which CSS properties parse, which window members exist, which JS builtins are present — and each maps to a release range no UA rewrite can move. Measured against browserscan, a persona claiming 124 on a 146 binary came back liedCSS/liedJS/liedWindow with an exact distance of 22.