README.md

Browser Detect

It's like a crystal ball for user agents.

Browser Detect identifies the client browser using the user agent string that was supplied in the page request. Browser Detect searches the user agent string for any string you provide, and it also supports some special groupings and shortcuts:

ie (Any version of IE, excluding browsers like Opera and WebTV that identify themselves as IE)

There's also a convenience method browser_is_mobile? which is just a shortcut to browser_is?('mobile')

def index
if browser_is_mobile?
# redirect to the mobile site
end
end

For WebKit-based browsers, you can also check the WebKit version using browser_webkit_version. This can be useful for determining what rendering capabilities the browser has. For instance, early versions of Mobile WebKit crash intermittently when you use multiple faces or weights of web fonts. So you might prevent your web fonts from rendering on old WebKit versions: