com.atlassian.confluence.util
Class UserAgentUtil
java.lang.Object
com.atlassian.confluence.util.UserAgentUtil
public class UserAgentUtil
- extends Object
Utility class for UserAgents sniffing.
Use this class as a last resort when server-side code must be different between browsers.
- Since:
- 4.3.4
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UserAgentUtil
public UserAgentUtil()
getCurrentUserAgent
public static UserAgentUtil.UserAgent getCurrentUserAgent()
- Retrieves the user agent for the current request.
If there is no current request returns a user agent with an unknown browser.
- Returns:
- UserAgent
getUserAgentInfo
public static UserAgentUtil.UserAgent getUserAgentInfo(String userAgent)
- Parses the User-Agent string from the request header and returns user agent data.
- Parameters:
userAgent - User-Agent string from the request header
- Returns:
- UserAgent
Copyright © 2003-2013 Atlassian. All Rights Reserved.