PDA

View Full Version : How to make your website Nintendo DSi friendly.



Apple Mac Boy!
03 Apr 2009, 04:50 PM
Hello.

So you want people who visit your website on a Nintendo DSi to be redirected to another version of it (say the mobile version so that it loads faster), well with this tiny fragment of Java Script you can do just that easily and quickly.

Here it is:




<script type="text/javascript">
// <![CDATA[
if(navigator.userAgent.match("Nintendo DSi"))
{
location = 'YOUR_URL_HERE.HTML' + location.search;
}
// ]]>
</script>


*** Instructions ***
1) Copy that code in to the main HTML of your websites home page (the higher up the better, ideally in the header).

2) Replace the "YOUR_URL_HERE.html" with the URL of the page that you want Nintendo DSi users to be redirected to.

3) Try it out. I have a test page here:

http://www.JohnColes.co.uk/dsitest/

Try that page on your computer and then on the DSi's web browser.

If you need any help feel free to PM me.


 Apple Mac Boy 