If the script uses any kind of browser detection, you have to be very
careful, especially with Opera. At one time you could depend on
appName and appVersion to sniff out the browser, but not anymore. If
you use appName to detect Opera you get Microsoft Internet Explorer!
If you go to userAgent on Opera 7.11 you find: Mozilla/4.0(compatible;
MSIE 6.0; Windows NT 5.1) Opera 7.11 [en]. Thus you would have to seek
out Opera in the userAgent to find Opera. For the Microsoft IE6 that
is slightly modified by the ISP MSN, you get an appName of Microsoft
Internet Explorer at least. However the appVersion is 4.0( compatible;
MSIE 6.0; Windows NT 5.1; Net CLR 1.0.3705, MSN 8.0; MSN 8.5; blah
blah. Most browsers give apCodeName as Mozilla. However MSNTV(WebTV)
gives "bowser" instead and this is the most simple way to detect
MSNTV.If you detect the wrong browser, you may get false results
concerning positioning and other "geometry" of the screen. You usually
need to check for document.all and W3C
(document.getElementByIdSupport).If you are interested in the old
Netscape 4 series browsers, you may also need to check for
document.layers support. IE4 uses document.all. IE5 and 6 use both
document.all and W3C DOMs. Even on the IE6, many still write using the
document.all DOM. Netscape6+ and the Mozillas use the W3C DOM only.
Opera 7.11 still uses both the document.all and the W3C DOM, although
the Opera users are more likely to select the W3C DOM than are IE
users. The point of this is that much older script used simple browser
detection to determine the correct code to use, and this often must be
updated for modern browsers for reasons mentioned above. Failure to do
so can result in all sorts of distortions of the page when viewed on
some browsers. In such a case, the problem is with the code written on
the page - not the IE, Netscape, Opera, etc. browser.