Today I dug around the source code of forecast.io a bit, and learned about some easy wins that contribute to the native-like web app experience on my iPhone. Check out the code and see whether you want to use in your mobile web apps!
Note that I’ve only verified these behaviors on iOS. And as the tagging suggests, it probably is meant to only work in iOS. Anyone know whether the same behavior can be achieved on Android devices?
Hiding the Safari browser chrome and address bar
This screenshot shows the runtime experience of Forecast.io on an iPhone. Note that there is no browser chrome or address bar to be seen!
How is this done? Here’s the meta tag:
<meta name="apple-mobile-web-app-capable" content="yes">
That’s all there is to it!
Displaying a custom icon in the app drawer
The next screenshot shows what you see after running Forecast.io, then returning to your home screen, then double-clicking on your home screen button to reveal the app drawer. There’s a Forecast.io app icon there!
And here’s how that’s done:
<link rel="apple-touch-icon-precomposed" href="http://forecast.io/images/icons/54.png"> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://forecast.io/images/icons/72.png"> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://forecast.io/images/icons/114.png"> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://forecast.io/images/icons/144.png">
Note the support for both regular and Retina home screen icons.
So with these two little snippets of code placed before your page’s </head> tag, you can achieve the same native-like user experience with a web app on an iOS device as Forecast.io.


Completely amazing and utterly boring
I really like these two Wired reviews of the Samsung Galaxy S4 and iPhone 5. They are completely spot on.
Since the launch of the original iPhone, we have been conditioned to be wowed by Apple and its competitors when it comes to smartphone innovations. Finally phones didn’t suck… and could even be awesome. Exciting news indeed!
Then this expectation was bolstered further by our somewhat surprising love affair with the iPad and other tablets. Suddenly we were also getting excited about products that we didn’t even need. Yet suddenly we did, or at least felt that we did.
But like everything cool and innovative, it eventually becomes more everyday and ho-hum. But as these reviews point out, that’s rather impressive in itself. The fact that these devices have become so ubiquitous and “normal” means that they are impacting us more and more, and as they become cheaper they will become even more common.
Because let’s face it, when is the last time you got excited about a new pencil, piece of paper, car, or garment? Sure, from time to time there’s new ideas in these and other product areas, too. But as products become everyday products, they cease to amaze us as much, even as they are continually enhanced but often in smaller, more incremental ways. And this is okay. So let’s stop expecting Apple and others to impress us as much with mobile devices as they used to. At least with glowing rectangles of various sizes.
Because we can be sure that something else exciting is still around the corner.