Simple methods to test the browser's user agent string.
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
js/src
README.md

README.md

GravDept User Agent

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

Gravity Department

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.
}