Full screen web apps fail to use Nitro acceleration in Apple's iOS 4.3Full screen web applications launched via a Home screen icon on iOS devices run significantly slower than when launched directly within Apple's Mobile Safari browser on the same device, developers report.
According to a report by the Register, when a web app is saved to the Home screen in iOS 4.3, it performs about 2 to 2.5 times slower than when launched and run from that Home screen icon into full screen mode, compared with running the same web app within the browser.
Additionally, the report notes that "such 'home screen web apps' can't use various web caching systems, including the HTML5 Application Cache, which means they can't be cached to run offline. And they aren't rendered using Apple's newer 'asynchronous mode.' They're saddled with the old 'synchronous mode,' which means means they don't quite look as good."
Developers have filed bug reports about the issue, and have reported Apple is aware of the problem. In addition to web apps saved to the Home screen, the performance issues and limitations also affect native iOS free or paid apps listed in the App Store that use the UIWebView API to create an HTML app within a native app.
A tale of two browser processes
"When done, the user will receive an icon inside the home menu as any other native app installed. Using a second meta tag (apple-mobile-web-app-capable) you can force your web app to be opened in full-screen mode."
In full screen mode, web apps do not use the new Nitro engine, resulting in significantly slower performance as Firtman illustrates using SunSpider benchmarks, where Safari runs through code in 4.2 seconds compared to a full screen app that takes 10.2 seconds to complete (below).
However, Firtman notes that its not just a matter of Safari choosing to run any web apps launched from Home screen icons deliberately slower. He reports that full screen web apps (and native apps using UIWebView) use a different engine from Safari, reportedly an internal process called WebSheet.app.
The lack of support for Nitro within this separate browser process could possibly be related to security considerations or simply be a bug or evidence of a work in progress, as Nitro was just released as part of the new iOS 4.3.
Firtman also states, "Unfortunately, Safari on iOS and even UIWebView without Nitro, are the most powerful mobile HTML5 engines out there. I say 'unfortunately,' because I want Android, BlackBerry, Nokia, HP to reach Apples engine. Some are close, but Apple is still ahead. Even if we talk about full-screen web apps: Apple is the only platform supporting this feature."
A conspiracy theory launched
On the second page of its report, the Register admits, "Apple isn't degrading the speed of home screen web apps. It's boosting the speed of web apps in the browser."
However, the publication framed the issue as a conspiracy theory, with a headline that maintains the company has "handcuffed 'open' web apps." Purportedly, the publication says Apple is purposely handicapping web apps to push users to buy apps from its App Store, where the company makes a commission from app sales, as opposed to web apps, which don't pay Apple a cut but also don't use any resources within iTunes.
The Register prominently cited an unnamed "mobile web app developer" as saying "Apple is basically using subtle defects to make web apps appear to be low quality even when they claim HTML5 is a fully supported platform," before admitting that the same problem also affects native apps that incorporate HTML.
If Apple were trying to force people to use the App Store, logically it wouldn't also purposely slow down apps in the App Store that use HTML internally. Additionally, it also wouldn't be working to accelerate web apps within the browser.
Further down the page, Alex Kessinger, a mobile app developer familiar who actually develops an App Store title, was cited by the Register as saying, "some people like to think of it as a conspiracy theory, but it could be a bug."
Two development platforms
Apple has long maintained that the iPhone, iPod touch and iPad support both the company's own native Cocoa Touch platform in apps that are only available for download through the App Store as well as the fully open HTML5 platform of the web, which Apple does not control.
"HTML5 is completely open and controlled by a standards committee, of which Apple is a member," Apple's chief executive Steve Jobs said of the web in his Thoughts on Flash.
This policy was completely opposite of the strategy Microsoft pursued in the 1990s, when the web first emerged. Microsoft saw the web as a threat to its dominant market position with Windows, and worked diligently to tie web development to native Windows APIs and to create non-standard web-related features that only worked within its own Internet Explorer browser.
For years, Microsoft's efforts prevented even simple Windows applications from being ported to the web. However, in the last decade a wide variety of tools and apps have migrated to the web, using its open, cross platform nature to reach users regardless of the hardware, operating system or browser they are using.
Rather than similarly viewing the web as a threat to its Cocoa Touch, Apple has embraced and led HTML5 development, and is recognized by third party developers such as Sencha as providing the best overall support for HTML5 standards in its mobile devices.
This has enabled Apple to maintain strict control over its native Cocoa Touch platform while allowing developers to bypass the company's infrastructure and take their apps to the web if they prefer to, leaving a relief valve for disgruntled mobile developers, pornographers, and hate speech proponents that Apple does not accommodate in the App Store.