The User Agent Library
The User Agent library provides access to information about the user agent string.
The language Function
The useragent:language returns the natural language version of language.
The following is an example of useragent:language.
Code Block | ||
---|---|---|
| ||
pre{
naturalLanguage = useragent:language();
} |
The language_code Function
The useragent:language_code returns the ISO code (e.g. "en" for english) of language
The browser_name Function
The useragent:browser_name returns the name of the browser (e.g "Internet Explorer")
The browser_version Function
The useragent:browser_version returns the complete version string
The browser_version_major Function
The useragent:browser_version_major returns the part preceding "." in version string
The browser_version_minor Function
The useragent:browser_name returns the part following "." in version string
The os Function
The useragent:os returns the operation system
The os_type Function
The useragent:os_type returns the general type of OS (e.g "Linux)
The os_version Function
The useragent:os_version returns the version of OS