homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

WebTV sniffer

 4:32 pm on Apr 11, 2001 (gmt 0)

I got this code from the WEBTV site.

I have a particular page in a frameset that I do not want exposed and web tv does just that.

I have this in the <head> and am trying to use meta refresh tags to redirect...it isnt working for some reason.

<SCRIPT LANGUAGE="JavaScript"><!--

if(navigator.appName.indexOf("WebTV") != -1) //WebTV detected
document.writeln("<meta http-equiv="refresh" content="0;URL=webtv_page.html">");

else //Non-WebTV detected.
document.writeln("<meta http-equiv="refresh" content="45;URL=super_duper_page.html">");




 5:45 pm on Apr 11, 2001 (gmt 0)

I don't see a problem, but you say it isn't working. Is neither redirect working, or only not the WebTV?

Two experiments come to mind:
1) Try using location.href= instead of document.writeIn.
2) Redirect only the WebTV, and have this very page actually BE the non-WebTV page.


 6:49 pm on Apr 11, 2001 (gmt 0)

Thanks tedster. It works using location.href

The webtv browser is a cool little tool to have. Helps discover some bad spots on your site.


 4:10 am on Apr 16, 2001 (gmt 0)

<meta http-equiv="refresh" content="45;URL=connection.html">
<SCRIPT LANGUAGE="JavaScript" type="text/Javascript"><!--

if(navigator.appName.indexOf("WebTV") != -1) //WebTV detected

else //Non-WebTV detected.
document.writeln(" ");

This is freaking nn 4.76 out....do you see any reason why it might not work? Opera, ie5 and webtv all work fine with this.


 7:12 am on Apr 16, 2001 (gmt 0)

Don't see a problem with the JavaScript on the face of it. What message do you get from the Netscape JavaScript console?


 7:12 am on Apr 16, 2001 (gmt 0)

Ya, the js in the webtv system is pretty rudimentary. The webtv viewer for windows is pretty accurate. It is always a shock to people to view a site with it.

I was taking with a guy I know in the northwest who said ms is toying with giving away the next webtv for free when you signup for msn. If that happens...wow. They just reported that msn has only been able to muster 5million subscribers. That is with their all out promotion blitz and give away for over two years.


 1:52 pm on Apr 16, 2001 (gmt 0)


This weird.

The code works fine with all browsers on all my sites (unix) EXCEPT the one site I have on NT. This one seems to cause Netscape to lose it. It flips the page to a 404.


 12:02 am on Apr 17, 2001 (gmt 0)

Try this:

<script language="JavaScript">
<!- hide from older browsers
if(navigator.appName.indexOf("WebTV") != -1)
//WebTV detected
//non-WebTV detected

It should work.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved