User Agent Parser
About
User-Agent parsing is pattern-matching against a string that was never standardised and is now being deliberately frozen by browsers (Chrome reduces UA granularity in favour of Client Hints) to cut fingerprinting. This parser applies the mainstream detection rules in the correct precedence order — Edge before Chrome (its UA contains "Chrome"), Opera before Chrome, version-bearing Safari via its Version token — and names the engine and OS families. It is the right tool for reading logs and support tickets; it is the wrong tool for security decisions, since a UA string is whatever the client claims it is.
Frequently Asked Questions
Why does Edge's UA say Chrome and Safari?
Historical compatibility: every browser claims Mozilla and WebKit heritage so old server sniffing serves it the modern site. Parsers must check the distinctive tokens first.
Can a UA be trusted for access control?
Never — it is trivially spoofed. Use it for analytics and debugging, not authentication.