The wii and JavaScript

By  on  

Last week, AJAXian featured an awesome article about serving wii-friendly websites. Accompanied with the article was a snippet of JavaScript that detects if the user is browsing using the wii's Opera browser, taken from the Ext framework:

var is_wii = navigator.userAgent.toLowerCase().indexOf('wii') > -1;

At this time, as wii's are still somewhat difficult to find, I feel safe in saying that non-wii-targeted websites need not put too much effort in catering to a wii audience. Being a wii owner, I can say that I find using its browser tedious and borderline worthless.

How long until we must format sites for the wii? Will we ever get to that point for websites other than niche video game sites? Please share your thoughts.

Recent Features

  • By
    JavaScript Promise API

    While synchronous code is easier to follow and debug, async is generally better for performance and flexibility. Why "hold up the show" when you can trigger numerous requests at once and then handle them when each is ready?  Promises are becoming a big part of the JavaScript world...

  • By
    Regular Expressions for the Rest of Us

    Sooner or later you'll run across a regular expression. With their cryptic syntax, confusing documentation and massive learning curve, most developers settle for copying and pasting them from StackOverflow and hoping they work. But what if you could decode regular expressions and harness their power? In...

Incredible Demos

  • By
    Xbox Live Gamer API

    My sharpshooter status aside, I've always been surprised upset that Microsoft has never provided an API for the vast amount of information about users, the games they play, and statistics within the games. Namely, I'd like to publicly shame every n00b I've baptized with my...

  • By
    Duplicate the jQuery Homepage Tooltips Using Dojo

    The jQuery homepage has a pretty suave tooltip-like effect as seen below: Here's how to accomplish this same effect using Dojo. The XHTML The above HTML was taken directly from the jQuery homepage -- no changes. The CSS The above CSS has been slightly modified to match the CSS rules already...

Discussion

  1. Trying to support every new type of browser that hits the market is like going down a bottomless rabbit hole, IMHO. You’ll never catch up with the newcomers. Sooner or later all of these new devices are going to wise up and start following standard browser specs. Obviously certain phenomena will come along every now and then and will create enough user demand to support it (i.e., the iPhone), but those are the exception to the rule. I think we’re still waiting for some standard practices to emerge out of the onslaught of mobile devices.

  2. I’ve thought about trying to integrate browser detection in my site; I know how, just haven’t gotten around to it or narrowed down exactly what I want to do.

    I also own a Wii but never ever use the internet browser. I played around for maybe 2 minutes when I first downloaded it.

  3. @Will:
    Obviously, object detection is better, but there are circumstances where browser detection is the best way to go.

    @David:
    I can’t wait until we have a great solution for formatting pages for every resolution. It’s getting better but I think there is some brilliant idea waiting around for this.

  4. I am a big fan of writing web pages that support as many browsers as possible.
    My World of Solitaire website supports Opera, IE6, IE7, Firefox, Safari and even Konqueror.
    I don’t find it too hard to write sites that work in all of them. Once you learn a few things ‘not to do’ then you end up with mostly compatabile markup and code that only requires a few browser specific tweaks to be the same across all.

    I did some additional checking so that when it detects a Wii, it behaves differently in order to support the smaller resolution. I even went so far as to create a domain just for the Wii owners, wiisolitaire.com

    In the end it was maybe 4 to 8 hours of total work. How many users play on the Wii? A tiny fraction of my total visitors. Not all Wii’s are hooked up to the internet, those that are not all of them have a browser installed and those that have both probably don’t know about my site.

    Based on this I probably won’t expend more than a few hours on any website to make it Wii compatabile. Just not worth the time :)

  5. mike

    @Jeremy Martin: Nintendo should of went with a web browser already in place. By the way i entered this via wii browser> lol

  6. The Wii Browser is fine. You can surf fast and uncomplicated in the web and even the most of the flash videos.

    By the way: You can use any USB-Keyboard with the Wii (and in the Internet-Channel).

  7. Bob

    I think that method of detecting the wii browser is a little excessive. All you need to do is check to see if window.opera and opera.wiiremote exist.

    Plus, this doesn’t really affect the majority of sites, and would be a waste of time, since the Internet Channel browser was developed by Opera and they’re usually pretty good about standards. The only folks who should care are the guys developing javascript games. The wii javascript should allow for very nice games which would be controlled much more easily using the wii remote’s gestures, rather than the buttons on the remote or a usb keyboard.

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!