Tuesday, 31 March 2009

Automatically distinguishing between a phone and a PC on a website

Despite browsers on phones getting better and better there is still a need for Mobile formatted sites, if not just for lower end phones, but for those on high end phones that hate the waiting or the difficult navigation of the full web on a phone.

Once you acccept this the next stage after creating your mobile site (which is easy with products such as Mippin) is how does your site detect between a phone and a PC. We get asked this question several times a month by publishers big and small. How to automatically distinguish between phones and pcs and send them to the right version of their websites.

Unfortunately there is no simple answer to this question because these publishers have substantial PC users and want to do the detection without degradation to their PC website performance - so they need to do the detection on their own hardware.

At the same time there is not enough standardisation on the server-side to make it a simple answer. However, we have fully documented several approaches and we detail them here.

There are 3 approaches:

1) Don't make it automatic. Just create a domain name or and send them to the right site. However, this is not very user friendly.

2) The next approach is if the publisher is using Apache servers there is a script that can be put in place. This script is here.

3) Finally for those using Wordpress we have a specific solution for wordpress owners. There can install a plugin which does it for you. Details of this plugin are here.

Note that these script are all geared with pointing the user at Mippin as the mobile rendering of the site, but this code is open and its easy to change the code to point at any mobile rendering so you are not forced to use us.


OpenID ffoeTSV11OrFnb2uBO350osE.BKB23Ms said...

With either of the redirection solutions remember to be very careful to leave the final choice of site to the user. If a mobile user wants to see the full site give it to them! Technically, this can be accomplished in a few ways - by adding cookies or using a special query parameter (eg. if a request has ?full=1 to skip the redirection. Most mobile sites include this as a link in footer "Goto Full Version".

There are many technical articles floating the net including with additional information on these techniques:

MobiForge: Mobile Switching Alogrithm
Mobile Device Detection

2 April 2009 at 08:44  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home