Mobile HTML5 development is becoming increasingly important — especially now Abobe has stopped developing Flash for the devices. Apple and Android mobiles offer webkit and Opera-powered browsers; testing in the desktop editions can help you fix the majority of issues.
But what about Windows Phone 7? The new OS is receiving positive reviews and new devices from Nokia, LG, HTC and Samsung have been launched. Fortunately for developers, the mobile web browser is a direct port of the desktop version of IE9. There are, however, a number of minor differences which could catch you out…
Features Added to IE9 Mobile
The following features appear in IE9 on mobile devices but not on the desktop equivalent:
- GPS support. HTML5 geolocation will use the phone’s GPS system if it’s available. The desktop edition resorts to IP look-ups and other less-accurate methods.
- Support for the viewport tag, e.g.
<meta name="viewport" content="width=device-width">
Note however that the minimum-scale, maximum-scale, and initial-scale properties are not currently supported.
- Support for
–ms-text-size-adjust(auto | none | percentage). This adjusts the text size for mobile devices, e.g.
–ms-text-size-adjust: 50%;makes it half size.
Features Removed from IE9 Mobile
The following features appear in the desktop edition of IE9 but not on mobile devices:
- Downloadable fonts. Font-face is still supported but the mobile browser will not download the files. Refer to the Windows Phone 7 supported font list.
- Cross-window communication — scripts cannot target a browser window.
- CMYK images (does anyone use these?)
- Multi-stream HTML5 audio.
Microsoft has also removed:
- compatibility view
To be honest, I’d be happy if these disappeared from the desktop edition! I’m sure it’s just a matter of time…
Overall, the mobile edition of IE9 is looking very good. In fact, it’ll be easier to develop for mobile Windows than the multiple desktop editions!
Craig is a freelance UK web consultant who built his first page for IE2.0 in 1995. Since that time he's been advocating standards, accessibility, and best-practice HTML5 techniques. He's created enterprise specifications, websites and online applications for companies and organisations including the UK Parliament, the European Parliament, the Department of Energy & Climate Change, Microsoft, and more. He's written more than 1,000 articles for SitePoint and you can find him @craigbuckler.