Johan Kohlin
Lecturer at School of engineering, Jönköping University.
http://slides.com/jkohlin/webapps
Configuration
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
Forcing your device to zoom in not zoom out
<head>
<!-- for Chrome on Android -->
<meta name="mobile-web-app-capable" content="yes"> //
<!-- for Safari on iOS -->
<meta name="apple-mobile-web-app-capable" content="yes"> //
</head>
Open in Fullscreen when page is saved to Home screen
<head>
<title>Web app</title> <!-- General Title -->
<meta name="application-name" content="Web app"><!-- iOS app Title -->
<meta name="apple-mobile-web-app-title" content="Web app"><!-- Android app Title -->
</head>
Adding a suggested App title
<head>
<!-- "Color" the status bar on iOS devices (either black-translucent or black) -->
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<!-- Color the status bar on Android devices -->
<meta name="theme-color" content="#2F3BA2">
</head>
Change background of status bar
"black"
Text
"black-translucent"
<head>
<link rel="icon" sizes="192x192" href="images/touch/chrome-touch-icon-192x192.png">
<link rel="apple-touch-icon" href="images/touch/apple-touch-icon.png">
</head>
Adding a custom icon to the home screen app
Actually, you need a lot more sizes to cover all different devices:
http://iconogen.com
<head>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="/android-chrome-192x192.png" sizes="192x192">
<meta name="msapplication-square70x70logo" content="/smalltile.png" />
<meta name="msapplication-square150x150logo" content="/mediumtile.png" />
<meta name="msapplication-wide310x150logo" content="/widetile.png" />
<meta name="msapplication-square310x310logo" content="/largetile.png" />
</head>
Here's to cover all possible devices (for now...)
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<!-- Add to homescreen for Chrome on Android -->
<meta name="mobile-web-app-capable" content="yes">
<meta name="application-name" content="Web Starter Kit">
<link rel="icon" sizes="192x192" href="images/touch/chrome-touch-icon-192x192.png">
<!-- Add to homescreen for Safari on iOS -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Web Starter Kit">
<link rel="apple-touch-icon" href="images/touch/apple-touch-icon.png">
<!-- Color the status bar on mobile devices -->
<meta name="theme-color" content="#2F3BA2">
</head>
All things you need to add to <head> to make your page web app capable
<!-- Will open page2.html in the Safari app, leaving your app -->
<a href="page2.html"> Go to next page </a>
<!-- The easiest way is to do this instead -->
<a onclick="location.href='page2.html'"> Go to next page </a>
Doesn't work
Works
Progressive Web apps now has support in iOS 11.3
More complicated but better
Something to learn for your project?
By Johan Kohlin