>As an aside, the hilariously long user-agent string is perhaps the best evidence that string-based browser detection is something that web devs should avoid at all costs. It manages to include "Safari", "Chrome", "AppleWebKit", "KHTML", "Mozilla", and "Gecko".
Further reading:
http://webaim.org/blog/user-agent-string-history/