November 1, 1999 - Detecting WebTV
November 1, 1999 Detecting WebTV Tips: November 1999
Yehuda Shiran, Ph.D.
|
if (navigator.appName.indexOf("WebTV") != -1) // WebTV detected
document.writeln("How do you like that WebTV?");
else // not WebTV
document.writeln("When are you going to get WebTV?");
You can use this technique to redirect WebTV users to a WebTV-optimized version of your site. Furthermore, you can take advantage of this sniffer to overcome various bugs in the WebTV implementation of JavaScript.