A small, fast, and rich-API browser/platform/engine detector for both browser and Node.js environments.
Bowser is a JavaScript library that detects browser, platform, and engine details from user-agent strings or User-Agent Client Hints. It solves the problem of identifying user environments to enable browser-specific functionality, polyfills, or conditional logic in web applications.
JavaScript developers working on web applications who need to detect browser properties for feature support, analytics, or providing tailored experiences based on the user's environment.
Developers choose Bowser for its small size, fast performance, and rich API that supports both traditional user-agent parsing and modern Client Hints, all while being optimized to include only necessary parsers.
a browser detector
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The ES5 version is only 4.8kB gzipped, and it allows using only necessary parsers, minimizing bundle size and improving performance as highlighted in the key features.
Works in both browser and Node.js environments, making it versatile for any JavaScript project, as stated in the multi-platform support.
Extracts detailed properties like browser name, version, OS, and engine, with methods like .getParser() and .satisfies() for filtering, as shown in the use cases.
Integrates with User-Agent Client Hints for enhanced accuracy and privacy-friendly detection, demonstrated in the examples with navigator.userAgentData.
Version 2.0 introduced drastic API changes, requiring code updates for those upgrading from older versions, as warned in the overview section.
Detection depends on user-agent strings that can be spoofed, leading to inaccuracies, though Client Hints help mitigate this but aren't foolproof.
The default ES5 version lacks polyfills, so developers might need to use the bundled version or handle polyfills separately, adding setup complexity as noted in the README.