Make your website an iPhone web application
These are a lot of tips to make your website an iPhone app so users can save it on their Home screens and access to your site faster.
Specifying a Webpage Icon for iPhone Home
We have two ways to design a custom icon that users can display on their Home screens using the Web Clip feature:
- a simple image where iPhone 1.1.3 and later automatically adds some visual effects so that it coordinates with the built-in icons. Specifically, iPhone 1.1.3 adds:
- rounded corners
- drop shadow
- reflective shine
This is the image for Luscarpa.com:

and this is how it is on iphone home screen:

- an image precomposed, to this image iPhone doesn’t add effects.
This is the image precomposed for Luscarpa.com:

and this is how it is on iphone home screen:

How we can provide this image? There are two ways:
- place an icon file in PNG format in the root document folder called
apple-touch-icon.pngorapple-touch-icon-precomposed.png. With this method you specify an icon for the entire website (every page on the website), - add a link element to the webpage, as in:
<link rel="apple-touch-icon" href="/custom_icon.png"/>
or
<link rel="apple-touch-icon-precomposed" href="/custom_icon_precomposed.png"/>
With this code you specify an icon for a single webpage or replace the website icon with a webpage-specific icon.
Hide Safari Components
Add this line if you want that your web app/website don’t show the safari user interface components:
<meta name="apple-mobile-web-app-capable" content="yes" />
Status Bar Appearance
You can change the Status Bar of web app/website using the following line of code:
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
There are three different colors:
1default
2black
3black-translucent
NOTE: If set to default or black, the web content is displayed below the status bar. If set to black-translucent, the web content is displayed on the entire screen, partially obscured by the status bar.
Specifying a Startup Image
On iPhone OS, similar to native applications, you can specify a startup image that is displayed while your web application/website launches. By default, this image is a screenshot of the web application with the page that the user has visited the last time. If you want customize it, add a link element to the webpage, like this:
<link rel="apple-touch-startup-image" href="/startup.png">
Here an example of my custom startup:

The image must be a png file and his dimensions 320 x 460 pixels in portrait orientation.
NOTE: this option works only if apple-mobile-web-app-capable is set to yes
Standalone Detection
You can develope custom features or effects for your standalone version of site, you can detect it using the boolean var window.navigator.standalone from javascript.
Note & Conclusion
All these tips only works for web pages that have been saved to the home screens and opened from there, if you access to your website using safari you don’t have this customizations. Remember also that any new link will be open in new browser tab so you lost these settings.
Is my opinion that if you develop a strongly ajax-oriented web application, so to avoid the users from stressing clicking and page refresh, allowing them to use just the “first page” , all these settings can be make your app amazing.
This website uses these options, you can test them adding it to your home screen of iPhone/iPod Touch, actually I’m using wordpress so there isn’t a customization to load all site with ajax so you can see the home page like web application, but if you click on a post link you will be redirect to safari.








Alex April 21, 2010 22:45:20
Cool! Is it possible to make an offline version of your site or cashed it on iphone?
Luscarpa April 22, 2010 09:33:02
No Alex, you can’t make an offline version, if you use ajax, you can show your web page like an iphone app where user open first page and no links to other pages but only refresh some parts of it. If you don’t use ajax your link open into safari.
Whoever June 22, 2010 19:18:47
http://www.thecssninja.com/javascript/how-to-create-offline-webapps-on-the-iphone
Doug July 20, 2010 18:30:29
hellonemo July 28, 2010 13:35:05
Cool cool that make looks like native apps
Austin Johnson July 29, 2010 04:03:05
MY new site
Brendan August 8, 2010 01:08:45
Can you use these on blogger? I’m trying but they won’t work! If you can tell me how.
Brendan August 8, 2010 01:10:01
Sorry wrong site!
Brendan August 8, 2010 15:22:17
Did you use wordpress because it won’t work on wordpress either!
Luscarpa August 9, 2010 21:35:41
Because it is fantastic for blog
Luca August 10, 2010 10:06:53
First of all I’d like to congratulate you for your web-designing skills. We’re almost the same age (I was born on 18th December), but I just started learning HTML/CSS, so be patient if I ask N00B questions.
I’d like to know how to add the name under the icon for the website/application. I noticed you have “Luscarpa” as a label – is it a default name? Like, if the website is http://www.cicciopuzzo.it, the label will be “Cicciopuzzo” or “www.cicciopuzzo.it”? Is there a way to set a custom name for the icon?
P.S. Of course I’m Italian, I’m speaking english because I reckon this is a english-only blog.
Luscarpa August 10, 2010 10:43:11
The name of label is set by the user, when you save the web page, the default label is the name of page, but the iphone gives you the ability to edit it.
I prefer use english so everybody can read my articles
Mikey August 31, 2010 11:28:15
Awesome man, thanks very much for this