A .NET library for parsing user agents to detect browsers, operating systems, devices, brands, and models.
DeviceDetector.NET is a .NET library that parses HTTP user agent strings to detect detailed information about the client's software and hardware. It identifies browsers, operating systems, device types (like mobile, tablet, TV), brands, and models, solving the problem of accurately understanding client environments in web applications and analytics.
Developers building .NET web applications, analytics platforms, or middleware that require client detection for customization, logging, or security purposes.
Developers choose DeviceDetector.NET for its accuracy, comprehensive detection capabilities, and seamless integration with .NET projects, backed by being a well-maintained port of the established PHP device-detector library.
The Universal Device Detection library will parse any User Agent and detect the browser, operating system, device used (desktop, tablet, mobile, tv, cars, console, etc.), brand and model.
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 README lists over 100 operating systems, browsers, and brands, providing comprehensive identification across web, mobile, TV, and console environments, ensuring accurate client profiling.
Includes dedicated parsers for bots, spiders, and crawlers, with options to skip or discard bot information for performance, as shown in the code example using dd.SkipBotDetection().
Supports caching mechanisms like DictionaryCache to speed up repeated detections, with the README demonstrating dd.SetCache(new DictionaryCache()) for optimized performance.
Optional support for client hints enhances detection accuracy, illustrated in the usage with ClientHints.Factory(headers) to parse modern browser signals.
As a direct port of the popular PHP device-detector library, it ensures reliability and allows developers to follow existing documentation, maintaining cross-platform consistency.
Relies on external YAML regex files that must be manually updated or configured via DeviceDetectorSettings.RegexesDirectory, adding maintenance overhead compared to auto-updating services.
Advanced caching requires custom implementation, such as setting up DictionaryCache or other providers, which can be cumbersome for simple deployments without built-in defaults for distributed scenarios.
Full user agent parsing can be resource-intensive, especially without caching; the README notes optional methods like DiscardBotInformation() to mitigate this, indicating potential trade-offs in speed.
As a port from PHP, it may not fully leverage .NET-specific features or performance optimizations, potentially making it less efficient than libraries designed natively for the .NET ecosystem.