-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
50 lines (44 loc) · 1.91 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="description" content="PWA test with minimal required implementation">
<!-- -------------------------- iOS tags -------------------------- -->
<!-- add to homescreen for ios -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- status bar style for ios -->
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<!-- theme color for ios -->
<meta name="theme-color" content="#de411b">
<!-- apple touch icon for ios -->
<link rel="apple-touch-icon" sizes="180x180" href="assets/icons/icon-apple-touch.png">
<!-- apple touch splash screen for ios -->
<link rel="apple-touch-startup-image"
media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3)"
href="assets/splashes/splash-1242x2208.png">
<!-- -------------------------------------------------------------- -->
<!-- favicon for browser tabs -->
<link rel="icon" type="image/png" href="assets/icons/favicon.png">
<!-- web manifest -->
<link rel="manifest" href="manifest.webmanifest">
<title>PWA Starter</title>
</head>
<body>
<h2>PWA Starter</h2>
<p id="sw_info"></p>
<noscript>Please enable JavaScript to continue using this application.</noscript>
<script type="text/javascript">
const swInfoEl = document.getElementById('sw_info');
if ('serviceWorker' in window.navigator) {
window.navigator.serviceWorker.register('sw.js')
.then((swRegistration) => {
swInfoEl.textContent = 'Service Worker has been registered successfully 🙂';
})
} else {
swInfoEl.textContent = 'Servie Worker is not supported by your browser 🙁';
}
</script>
</body>
</html>