@ProviderType
public interface BrowserSniffer
Modifier and Type | Field and Description |
---|---|
static String |
BROWSER_ID_EDGE |
static String |
BROWSER_ID_FIREFOX |
static String |
BROWSER_ID_IE |
static String |
BROWSER_ID_OTHER |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsGzip(javax.servlet.http.HttpServletRequest request) |
String |
getBrowserId(javax.servlet.http.HttpServletRequest request) |
BrowserMetadata |
getBrowserMetadata(javax.servlet.http.HttpServletRequest request) |
float |
getMajorVersion(javax.servlet.http.HttpServletRequest request)
Returns the browser's version number as a float.
|
String |
getRevision(javax.servlet.http.HttpServletRequest request)
Returns the browser's revision.
|
String |
getVersion(javax.servlet.http.HttpServletRequest request)
Returns the browser's version.
|
boolean |
isAir(javax.servlet.http.HttpServletRequest request) |
boolean |
isAndroid(javax.servlet.http.HttpServletRequest request) |
boolean |
isChrome(javax.servlet.http.HttpServletRequest request) |
boolean |
isEdge(javax.servlet.http.HttpServletRequest request) |
boolean |
isFirefox(javax.servlet.http.HttpServletRequest request) |
boolean |
isGecko(javax.servlet.http.HttpServletRequest request) |
boolean |
isIe(javax.servlet.http.HttpServletRequest request) |
boolean |
isIeOnWin32(javax.servlet.http.HttpServletRequest request) |
boolean |
isIeOnWin64(javax.servlet.http.HttpServletRequest request) |
boolean |
isIphone(javax.servlet.http.HttpServletRequest request) |
boolean |
isLinux(javax.servlet.http.HttpServletRequest request) |
boolean |
isMac(javax.servlet.http.HttpServletRequest request) |
boolean |
isMobile(javax.servlet.http.HttpServletRequest request) |
boolean |
isMozilla(javax.servlet.http.HttpServletRequest request) |
boolean |
isOpera(javax.servlet.http.HttpServletRequest request) |
boolean |
isRtf(javax.servlet.http.HttpServletRequest request) |
boolean |
isSafari(javax.servlet.http.HttpServletRequest request) |
boolean |
isSun(javax.servlet.http.HttpServletRequest request) |
boolean |
isWebKit(javax.servlet.http.HttpServletRequest request) |
boolean |
isWindows(javax.servlet.http.HttpServletRequest request) |
static final String BROWSER_ID_EDGE
static final String BROWSER_ID_FIREFOX
static final String BROWSER_ID_IE
static final String BROWSER_ID_OTHER
boolean acceptsGzip(javax.servlet.http.HttpServletRequest request)
String getBrowserId(javax.servlet.http.HttpServletRequest request)
BrowserMetadata getBrowserMetadata(javax.servlet.http.HttpServletRequest request)
float getMajorVersion(javax.servlet.http.HttpServletRequest request)
getVersion(HttpServletRequest)
, which returns the version
number as a String.
Note that the version returned is defined as the real version of the
browser software, not the one used to render the page. For example, the
browser can be IE10 but it may be using a compatibility view emulating
IE8 to render the page. In such a case, this method would return
10.0
, not 8.0
.
request
- the servlet requestString getRevision(javax.servlet.http.HttpServletRequest request)
Note that the revision returned is defined as the real revision of the
browser software, not the one used to render the page. For example, the
browser can be IE10 but it may be using a compatibility view emulating
IE8 to render the page. In such a case, this method would return
10.0
, not 8.0
.
request
- the servlet requestString getVersion(javax.servlet.http.HttpServletRequest request)
Note that the version returned is defined as the real version of the
browser software, not the one used to render the page. For example, the
browser can be an IE10 but it may be using a compatibility view emulating
IE8 to render the page. In such a case, this method would return
10.0
, not 8.0
.
request
- the servlet requestboolean isAir(javax.servlet.http.HttpServletRequest request)
boolean isAndroid(javax.servlet.http.HttpServletRequest request)
boolean isChrome(javax.servlet.http.HttpServletRequest request)
boolean isEdge(javax.servlet.http.HttpServletRequest request)
boolean isFirefox(javax.servlet.http.HttpServletRequest request)
boolean isGecko(javax.servlet.http.HttpServletRequest request)
boolean isIe(javax.servlet.http.HttpServletRequest request)
boolean isIeOnWin32(javax.servlet.http.HttpServletRequest request)
boolean isIeOnWin64(javax.servlet.http.HttpServletRequest request)
boolean isIphone(javax.servlet.http.HttpServletRequest request)
boolean isLinux(javax.servlet.http.HttpServletRequest request)
boolean isMac(javax.servlet.http.HttpServletRequest request)
boolean isMobile(javax.servlet.http.HttpServletRequest request)
boolean isMozilla(javax.servlet.http.HttpServletRequest request)
boolean isOpera(javax.servlet.http.HttpServletRequest request)
boolean isRtf(javax.servlet.http.HttpServletRequest request)
boolean isSafari(javax.servlet.http.HttpServletRequest request)
boolean isSun(javax.servlet.http.HttpServletRequest request)
boolean isWebKit(javax.servlet.http.HttpServletRequest request)
boolean isWindows(javax.servlet.http.HttpServletRequest request)