-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·34 lines (34 loc) · 1.11 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-control" content="no-cache" />
<meta http-equiv="Cache" content="no-cache" />
<link rel="manifest" href="./manifest.json" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
<script>
/* Browser if support service worker */
if ('serviceWorker' in navigator) {
/* After finished load event, register service worker */
window.addEventListener('load', function() {
/* Register sw.js */
navigator.serviceWorker
.register('/sw.js')
.then(function(registration) {
console.log('sw.js register success', registration.scope);
})
.catch(function(err) {
console.log('sw.js register failed ', err);
});
});
}
</script>
</html>