
Apple seems to be a big proponent of HTML5: They use it for their new iAds, as Steve proudly announced during his last Keynote. So when I wanted to maken an Ipad webapp, I didn’t expect any issues. For a client of mine, I planned to work on an iPad webapp this week. It’s even the reason I bought an iPad.
Let’s start with the only good news: Setting an homescreen image, with
<link rel="apple-touch-icon" href="/custom_icon.png"/>
does work, and if you make the image 72 pixels wide, it looks great on both iPhone and iPad (the previous advice was 57 pixels, but this looks blurry on the iPad as it’s scaled up).
On the iPhone, there are some other properties you can set on a webpage to make it work offline: Besides the homescreen icon, you can set the status bar color, startup image, and viewport size, and make files work when not online. The result looks and works like an app instead of a webpage: No URL field, navigation buttons, a startscreen, etc. Apple invented these, and has extended their support in their OS updates. See for a good description: How to Make an HTML5 iPhone App and a great HTML5 example app is the PieGuy game. They work great, and can make it easier to build and distribute an application, without sending it to Apple for approval (the current appstore mess is a whole different blogpost).
Since Apple supports this in their iPhone OS, and the iPad runs iPhone OS 3.2, I expected this all to work. Unfortunately, it doesn’t.
On the iPad, the startup image and viewport size are ignored when run in webapp-mode. The viewport size is only used when shown in a normal browser window, and the startup image is never shown :(.
On an iPhone with OS 3.1, both do work. This makes the result, on an iPad, work more like a (broken) webpage, than an application.
Why did apple take working stuff out, when upgrading the iPhone OS from 3.1 to 3.2 for the iPad? Is this a simple omission which will be fixed, or is apple actively moving away from HTML5 webapps for the iPad, further pushing their appstore? Only time will tell.
Update:
I looked into this some more, and have more results:
If you use a image with the right size, (1024*768), it does (sometimes) work on my iPad as startup image. My previous tests used a iphone-sized image, which is totally ignored on the iPad. However, it often takes a few tries before it shows the loading image, and sometimes shows a screenshot of the page, before showing the default loading screen. (so the flow is then screenshot->default.png->webpage).
I still can’t get the viewport tag to work in webapp mode: If I set the viewport to a predefined with, like:
<meta name=”viewport” content=”user-scalable=no, width=1024″/>
this does work in Safari, but is ignored in Webapp mode. If I set a scale:
<meta name=”viewport” content=”initial-scale=1.0, user-scalable=no”/>
and test in Safari, this does work on first load. However, if I rotate my ipad, and rotate back, the scale is set differently.