XSPUserAgent (JavaScript™)
Represents the User-Agent request header field of the HTTP request sent from the browser.
See http://web.archive.org/web/20061217053523/http://en.wikipedia.org/wiki/User_agent for a discussion of user agents.
Use getUserAgent (XSPContext - JavaScript) to get an XSPUserAgent object.
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();
}