I’ve said it many times already: the iPhone was a game changer in the mobile ecosystem. A big part of that change is the impact that it had on the mobile web and specifically on mobile web applications. The iPhone provided people all over the world a glimpse of the future of mobile—that the mobile web didn’t have to be these ugly lists of text, that now we could create something unique and cool for mobile devices using the same techniques we use on the Web.
I have to admit that I’ve deceived you with the title of this chapter; this chapter isn’t about creating iPhone web apps, it is about creating mobile web apps for the iPhone and beyond. Because when we are talking about iPhone web apps, we are actually talking about WebKit, the mobile web browser behind the iPhone and iPod touch, and also the device browser in some of the best-selling smartphone platforms, like the Nokia Series60 (or S60), Android, Palm’s webOS, and more. In a short period, WebKit went from being just the core technology for Apple’s web browser Safari to one of the top, most proven mobile browsers in the world.
But the story doesn’t stop with just WebKit. The iPhone created a sea change within the entire mobile web landscape. After the iPhone, the device browser suddenly went from being a third-class citizen to being its killer app. Operators and device makers partnered with browser makers to get competitive browsers in their devices to rival the features of the iPhone. Once the iPhone bolted out as the market leader, the rest of the pack knew exactly what they needed to do to catch up, or in some cases compete: what the market wanted.
The secret to WebKit’s mobile successes isn’t the fact that it powers the device browser of the iPhone; it is simply that it has excellent support for defined web standards. Support for web standards, and the ability to bring a desktop-quality web browser to mobile devices is out of reach for all but a handful of mobile browsers. Ironically, we’ve learned since the iPhone’s debut that excellent support for web standards was the basic obstacle that had held back massive adoption of the mobile web. WebKit brought the Web that we’ve come to expect and love from the desktop to our mobile devices. In doing so, it has defined a new category of mobile content: the mobile web app, which barely existed before the iPhone. This chapter dives into what makes iPhone web apps tick. It looks at WebKit and introduces some techniques that will work only on WebKit and some that will work only on an iPhone or iPod touch. This isn’t to play favorites to Apple’s devices, but to showcase how the market is being defined and applied to devices beyond the iPhone.