by Paul Krill, Galen Gruman

Bad news: iOS 7’s HTML5 is full of bugs

analysis
Sep 27, 20135 mins

'This is the buggiest Safari version since 1.0,' says one HTML5 development expert

Apple’s iOS 7 is plagued with HTML5 defects related to the Web SQL database, home-screen widgets, gestures, and animations. Maximiliano Firtman, an HTML5 developer and author of several popular Web programming books, revealed several of these bugs in his blog. And Michael Mullany, CEO of Web development environment vendor Sencha, both confirmed Firtman’s findings and found more problems in Apple’s HTML5 execution.

“Normally we’re effusive about new releases of iOS to the point of fanboy-dom, but this time, and for the first time ever, we’re disappointed in the execution of iOS software,” wrote Mullany. “Although there are some impressive performance gains in SVG and JavaScript, the sheer number of bugs and broken features clearly mark this release as a beta. While nowhere as bad as the Android 3 browser — our all-time champ of broken Web releases — we recommend that organizations standardized on HTML5 development hold off upgrading until an iOS update fixes these issues.”

Firtman was even more direct: “I can say without fear of mistake that this is the buggiest Safari version since 1.0.” He noted that some bugs were reported by developers in iOS 7’s three-month beta period, but were not fixed in the released version.

One problem area Firtman described involves Web SQL permissions not working correctly when trying to expand the database size beyond 5MB. In previous versions of iOS 7, the limit was 50MB, so many apps will now exceed that limit in their database downloads. Worse, if that limit is exceeded, the user will get a confirmation dialog box to allow the larger download but then only the first 5MB will actually be downloaded.

Firtman noted a workaround: If the app requests 5MB or less the first time and then requests more data, the user gets the permissions dialog box, and iOS 7 allows the extra data. Also, the bug doesn’t appear to occur when apps are running in full-screen mode, which is the default in iOS 7.

Another issue Firtman detailed relates to iOS’s ability to save home-screen icons of Web pages so that users can access them quickly as if they were apps. Firtman said that any URIs in the Web address — the portion after the domain name — is ignored, so a home-screen Web app can’t invoke any functions in the URI when opened. Likewise, cookies are now ignored when opening a home-screen app. Also, if you store more than four Web pages as home-screen apps, iOS 7 often replaces icons of existing home-screen apps with the newly saved ones — you get that errant replacement once your device has four home-screen Web app icons on it.

Mullany noted that when managing application state in apps that use AppCache, the history object never updates, disabling history.back. This can cause applications to work incorrectly if they need a prior state to resume a function.

Mullany’s company uncovered a CSS-related bug in which requestAnimationFrame animations don’t suspend correctly. “When you have an animation on an active page and switch to another page, the animation doesn’t stop — and it should,” Mullany told InfoWorld. Also, “in the rush to get iOS 7 out the door, making sure SVG animation via JavaScript was fast seems to have been dropped. Animating SVG with JavaScript is now a hit-or-miss proposition,” he told us.

Another issue involves inconsistent rendering after rotating content, which Firtman noted in Safari and Mullany noted in other apps. Mullany also cited the following issues:

  • Launching and quitting the same home-screen app several times can hard-lock the device, requiring a hardware reboot.
  • On iPad, if the document body is set to 100 percent height, content is shifted upwards by 20 pixels in landscape mode. This can be worked around by calling window.scrollTo(0, 0) on the orientationchange event.
  • In certain cases, resizing a composited layer (an element with 3D transform) does not repaint it correctly. Instead, the cached bitmap is stretched.
  • Scripts running within Web Workers are not suspended unless either the originating page is explicitly killed, or the Safari process is explicitly terminated. The three techniques you’d expect — switching to another tab, minimizing Safari, or turning off the screen — don’t stop Web Worker execution. “This is a serious issue that allows any Web page to drain the battery of an iOS 7 device and slow down performance of the whole system without a user alert,” Mullany wrote. It may be related to iOS 7’s new multitasking feature, which keeps app running when you switch to others rather than suspending them as before — except for a small number of background services that Apple allows to keep running.

Firtman has many other complaints, although most are not bugs but frustrations due to the new look of iOS 7 as well as Safari’s full-screen mode, which causes several common hacks not to work any longer.

One example is that you can no longer use JavaScript to explicitly hide the menu bar; it auto-hides now. He’s also upset that Safari no longer shows the actual page URL, just that of the website, so it’s harder for users to know where they are in a site hierarchy. (The full URL becomes visible if you tap the URL field, the action used to enter a new URL.) Firtman also details the new capabilities in iOS 7’s HTML5 implementation, which he said Apple has poorly documented.

This story, “Bad news: iOS 7’s HTML5 is full of bugs,” was originally published at InfoWorld.com. Get the first word on what the important tech news really means with the InfoWorld Tech Watch blog. For the latest developments in business technology news, follow InfoWorld.com on Twitter.