Affiliate Disclosure
If you buy through our links, we may get a commission. Read our ethics policy.

Full screen web apps fail to use Nitro acceleration in Apple's iOS 4.3

Full 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.

This appears to be the case because the new Nitro JavaScript engine released as part of iOS 4.3 does not activate when launching full screen web apps saved as Home screen icons. (Full screen means the web browser user interface goes away, leaving a web app that is virtually indistinguishable from a native app; it is a feature unique to Apple's iOS).

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

Investigation into the issue by Maximiliano Firtman, an author who writes about mobile web programming, notes that "Safari on iOS has an excellent feature that I still can’t believe Android, Nokia or BlackBerry doesn’t support yet. Using just some HTML and some JavaScript, you can suggest, or even force, a user to add the app to the Home Screen.

"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 Apple’s 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.

Apple is also in a competitive race with Google, Mozilla and Microsoft to deliver the fastest HTML5 and JavaScript performance, making it difficult to imagine how the company would benefit from deliberately setting up an easy benchmark for failure in that regard just to distract attention away from simple mobile web games and other applets that have little to no impact on the record setting sales Apple has been experiencing with the App Store since opening it in 2008.