Skip to content

Commit

Permalink
Add code to index.html to uninstall any old service workers when present
Browse files Browse the repository at this point in the history
  • Loading branch information
insin committed Mar 14, 2020
1 parent 69af63b commit 8d7f64d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@
<meta name="msapplication-TileColor" content="#222222">
<meta name="msapplication-TileImage" content="img/mstile-144x144.png">
<meta name="msapplication-config" content="img/browserconfig.xml">
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.getRegistrations().then(function(regs) {
regs.forEach(function(reg) {
reg.unregister()
})
})
}
</script>
</head>
<body>
<div id="app"></div>
Expand Down

0 comments on commit 8d7f64d

Please sign in to comment.