I previously wrote about the new IE Mobile 6 browser which brings an improved browsing experience to Windows Mobile. From a web developers point of view, this changes a few things also, particularly the user agent string. With the new IE Mobile 6, the user has the option to render a 'desktop version' or a 'mobile version' of the web site.
Within your web application you will need to look at the User-Agent string sent by the browser.
When the user is browsing using the 'Mobile Device' option you will get the following:
Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 8.12; MSIE Mobile 6.0)
When the user is browsing using the 'Desktop' option you will get the following User-Agent string:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
To view the User-Agent string on the device open up IE Mobile on the device and type in about:version in the address bar. You will get the following for the 'Mobile' option (Click on the image to see it in full size):
And the following for the 'Desktop' option:
As a web developer I believe that is all you need to know.
But what if you don't have a mobile optimised site and ignore the headers and the user never changes to 'Desktop' view? IE Mobile 6 recognizes this and automatically renders the page appropriately. Here is my blog (which ironically doesn't have a mobile optimised version) rendered by IE Mobile 6:
If you are interested in more technical details on IE 6 Mobile check out the Internet Explorer Mobile blog or the Internet Explorer Mobile Reference on MSDN.