JarHead's WebTV Information Center
Detecting WebTV Boxes
Let's say you've made a WebTV optimized version of your website, and now you'd like to automatically redirect WebTV users to that site. I'll show you how it can be done very easily with some JavaScript.
We're just going to use a very simple JS browser sniffer for this. Just add the following code to your page, and modify it to suite your needs.
<SCRIPT><!--
if(navigator.appName.indexOf("WebTV") != -1)
window.location.replace("index-wtv.html");
</SCRIPT>
If you also have a Netscape Navigator sniffer in place, it would be a good idea to put the WebTV sniffer before the Netscape sniffer. This is because a bug in some WebTV client versions make a check for Netscape return "True".
Enjoy!