Lasse Reichstein Nielsen wrote:
"cwdjrxyz" <sp*******@cwdjr.info> writes:
Take a look at http://www.explorerdestroyer.com/ and view the script
used to detect IE. It uses quite a maze of elaborate script that
examines user agents and many properties of a browser.
Not that elaborate, but still more fragile than just doing:
<!--[if IE]>
<script type="text/javascript">
var isIE = true;
</script>
<[end if]-->
Yes, using the IE conditional comments would appear to be safer as well
as more simple.
I notice that they checked for WebTV in the ua. I believe the old WebTV
boxes spoofed IE4, and newer boxes(now MSNTV) spoofed IE6. Thus one
might not want to reject them. The most simple way to detect the old
WebTV boxes is, of all things, with the appCodeName. Most browsers give
Mozila here, but the old WebTV boxes use "bowser". I doubt if any
computer browser maker would want to spoof and old MSNTV box. Bowser
was the name of a rabbit belonging to one of the developers of
WebTV(long since sold to Microsoft). There are still some of the old
WebTV boxed in use in the US, but the number now likely is well under
one million boxes. The new MSNTV boxes, out about a year now, use a
watered-down IE6 browser. These can be detected in the ua by a string
that gives the non-standard screen dimensions used for display on a TV
set. This likely woud be fairly safe for detecting the new boxes, since
what computer browser maker would want to spoof the new MSNTV boxes?
The suggestion to download Firefox would be completely useless for
eithet the old or new WebTV/MSNTV boxes, because neither can download
anything. The boxes are stuck with what Microsoft decides to provide
them.