User Agent / Mobile Device Detection | |
---|---|
Updated | May 21, 2015 |
Author | dotCMS |
Version | 1.0 |
Compatible | [3.0] |
Description | An osgi plugin that provides a viewtool that allows a web developer to detect the user's browser, device and operating system. The plugin uses the "User Agent Utils" library by Harold Walker. |
https://github.com/dotCMS/plugin-user-agent-info
An osgi plugin that provides a viewtool called $useragent that allows a web developer to detect the user's browser, device and operating system. The plugin uses the "User Agent Utils" library by Harold Walker.
On the "Dynamic Plugins" screen, upload the build/libs/plugin-user-agent-info-0.1.jar. You should see the plugin as started (meaning, your only option is to stop or undelpoy).
This tool implements a viewtool that uses the nice user-agent-utils project by Harold Walker.
http://www.bitwalker.eu/software/user-agent-utils
viewtool: $useragent
agent:$useragent.agent
type:$useragent.type
browser:$useragent.browser
version:$useragent.version
os:$useragent.os
manufacturer:$useragent.manufacturer
engine:$useragent.engine
agent: UNKNOWN-BOT
type: UNKNOWN
browser: BOT
version: $useragent.version
os: UNKNOWN
manufacturer: OTHER
engine: OTHER
The $useragent.type
returns one of the following Strings that you can use to check against:
The $useragent.browser
returns one of the following Strings that you can use to check against: