getBrowserVersion (XSPUserAgent - JavaScript™)
Gets the version of the browser as a string.
Syntax
getBrowserVersion() : string
Return value | Description |
---|---|
string |
The version of the browser, or an empty string. |
Usage
If the return value is an empty string, you must analyze XSPUserAgent (JavaScript).To get the version as a number see getBrowserVersionNumber (XSPUserAgent - JavaScript).
Examples
This computed field displays the browser and version, or the complete user agent string if the browser is not identified:var browser = context.getUserAgent().getBrowser();
if(!browser.isEmpty()) {
return browser + " " + context.getUserAgent().getBrowserVersion();
} else {
return context.getUserAgent().getUserAgent();
}