/user-agent

Simple methods to test the browser's user agent string.

Primary LanguageJavaScript

Gravity Department

GravDept User Agent

Simple methods to test the browser's user agent string.

Dependencies

  • None

Usage

Include the script in your page:

<script src="path/to/user-agent.js"></script>

And call the methods you need:

if (userAgent.isOldIos() || userAgent.isOldAndroid()) {
    // Warn users their browser is outdated.
}