Skip to content

Instantly share code, notes, and snippets.

@boennemann
Created March 22, 2012 10:59
Show Gist options
  • Save boennemann/2157678 to your computer and use it in GitHub Desktop.
Save boennemann/2157678 to your computer and use it in GitHub Desktop.
Adapt WebApp Viewport & Icon settings of the "Add to Home Screen" option on iOS
AddType text/cache-manifest .appcache
insert icon here
<!doctype html>
<html manifest="manifest.appcache">
<head>
<title>App Title</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon-precomposed" href="icon.png">
</head>
<body>
Add To Home Screen
<script>
if (window.navigator.standalone) {
window.location = "http://yourappsurl.com";
}
</script>
</body>
</html>
CACHE MANIFEST
index.html
icon.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment