In early December, Google released the latest major upgrade to its Android mobile operating system, Android 4, codenamed Ice Cream Sandwich. For Web developers, this represented a prime litmus test of Android: could HTML5 be a viable cross-platform solution for building on both iOS and Android? Results of the latest versions of both Apple’s iOS (version 5) and Android (version 4) to understand what each platform offers the Web application developer and its specific advantages and merits.
WebKit: Android 4 shows big gains, but still has gaps
Nearly every mobile Web browser starts with the WebKit rendering engine. An open-source project originally forked by Apple from KDE/KHTML and now backed by the participation of Apple, Google, Qualcomm, RIM and many others, it’s now the de facto standard for rendering Web content on mobile. Both the Android 4 and iOS 5 browsers are based on WebKit, with each implementing a slightly different version. For the former, it implements WebKit 534.30, while the latter implements 534.46.
Also, in the rendering feature set, Android 4 has added support for many of the CSS3 features that had long been integral to iOS 5. Specifically, Android 4 now properly supports CSS3 2D and 3D transformations, animations, transitions and reflections. This is a major step forward for Android as Web developers can now start to leverage the skills they’ve been honing on iOS to make fluid and expressive Web applications. With these features now supported, we’re hoping that Google and the Android hardware vendors will polish off their implementations to make them flicker-free and deliver higher performance so developers can truly rely on these advanced rendering features.
iOS 5/Safari leads with more APIs
The last part of the browser stack is the APIs, where capabilities like network access, file system access, Canvas and other rich app-like functions are exposed. iOS has long been the standard-bearer in API support and, even with the improvements embodied in Android 4, this continues to be the case. iOS 5 added support for features like “overflow: scroll“; the WebKit-proprietary “-webkit-overflow-scrolling: touch” (which allows independent scrollable areas and touch bounces); Web Sockets (for more real-time communication); Web Workers (for background processing); and many different HTML5 input types (such as number and date). Android 4 still lacks support for these common HTML5 features, but does have one standout addition, which is support for the File API. The File API makes it possible for developers to manipulate local files on the device, allowing richer apps and access to features such as the phone’s camera roll. Nonetheless, iOS 5 offers a richer set of browser APIs and broader support for HTML5 features.
For now, iOS 5 has the overall lead