About 15 years out of date.
The userAgent is a free format field that can be set to contain ANYTHING AT ALL by the browser's owner - at least it can with Internet Explorer, Firefox, Mozilla, and Netscape. Opera changes the userAgent automatically to whatever you want to present to different web sitesw with a choice of identifying itself as IE, Firefox, or Opera.
Using code like that is the easiest way to totally stuff up your web page.
Use feature sensing when necessary in your code - NEVER test user enterable free format fields to try to work out what browser it is.