Reputation: 3685
I want to create an icon on an iPhone to link to a web app, but assuming my users won't know to find "add to home" I think it's better to have an html link saying "click here to add an icon to your desktop" (or something along those lines). I know the code for the icon is
<link rel="apple-touch-icon" href="touch-icon-iphone.png" />
But what's the code for the "click here"?
Thanks!...any time you help me you save a kitten!!
Upvotes: 2
Views: 531
Reputation: 4196
There's unfortunately no way to add a bookmark to home screen by code, you have to indicate to your users that they need to do it manually.
To do this, there is a neat little JS library: mobile-bookmark-bubble.
The Mobile Bookmark Bubble is a JavaScript library that adds a promo bubble to the bottom of your mobile web application, inviting users to bookmark the app to their device's home screen. The library uses HTML5 local storage to track whether the promo has been displayed already, to avoid constantly nagging users.
The current implementation of this library specifically targets Mobile Safari, the web browser used on iPhone and iPad devices.
Upvotes: 2
Reputation: 180024
You have to write the code for the 'click here' yourself, it's not a standard part of the operating system or anything. It's just HTML/CSS/JS.
Upvotes: 0