client.browser.version
STRING, read-only.
Available inall subroutines.
The version of the browser in use on client device. This applies to browsers on
all client devices, not just those for which client.class.browser
is true.
Example
An example of applying a Feature-Policy
based on the major part of a particular
browser's version number:
declare local var.browser_version INTEGER;
if (client.browser.name != "" && client.browser.version != "") { # capture just the major version set var.browser_version = std.atoi(if (client.browser.version ~ "^([0-9]+)", re.group.1, "0"));
# A vulnerability in WebUSB in Chrome was fixed in v73, # so disable USB in any version earlier than that if (client.browser.name == "Chrome" && var.browser_version < 73) { add resp.http.Feature-Policy = "usb 'none'"; }}