{UAParser.js} is a JavaScript library to detect user's Browser, Engine, OS, CPU, and Device type/model. Runs either in browser (client-side) or node.js (server-side).
{UAParser.js} abstracts away the hassle of User-Agent detection by turning them into a set of simple & meaningful data. As an example, this is what we get from your browser's User-Agent information:
{UAParser.js} will transforms it into a well-structured format:
User-Agent string as of today is a mess. On the other hand, there is no reliable way to identify user details.
{UAParser.js} filters the noise away & extracts only the most meaningful data: Browser, Engine, OS, CPU, & Device in a well-structured format.
No bloated framework. No transpiler required. No unnecessary boilerplate. No dependencies.
Just a good ol' ES3-compatible syntax that is able to run on relatively old browsers while also performs on most modern devices.
For jQuery user, {UAParser.js} automatically detects and generates a plugin as $.ua
Also, for TypeScript user, there is a community-maintained types: @types/ua-parser-js
Whether it's a client-side webpage running in a browser, or a server-side node.js app, simply type:
$ npm i ua-parser-js"A great utility library to have when you're investigating what kind of users are visiting your website and how you can improve their UX. Supports most browsers out there."
Gabrijel Golubić - Frontend Web Developer
"I've been using your library for a long time and it totally rocks!".
Christian Rich - Web Developer
"Thank you for putting out this very useful library!".
Anuj Nijhawan - Web Developer
Copied!