Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Created August 4, 2017 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthieu-D/4493049089c8140c031c503c7f1c919b to your computer and use it in GitHub Desktop.
Save matthieu-D/4493049089c8140c031c503c7f1c919b to your computer and use it in GitHub Desktop.
<!--un-comment this code to enable service worker-->
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js')
.then(() => console.log('service worker installed'))
.catch(err => console.error('Error', err));
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment