aboutsummaryrefslogtreecommitdiff
path: root/public/index.html
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-08-24 21:09:17 +0300
committereug-vs <eug-vs@keemail.me>2020-08-24 21:09:17 +0300
commit918d2f62a9589abc657d9aa6c458f4630ecb5a41 (patch)
tree20bbefd3e380df863af392d87507286743d52ee4 /public/index.html
parent89f038c7a0ccf6de94516cba8499a0bc69f8dae1 (diff)
downloadwhich-ui-918d2f62a9589abc657d9aa6c458f4630ecb5a41.tar.gz
feat: implement service-worker with caching
Diffstat (limited to 'public/index.html')
-rw-r--r--public/index.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/public/index.html b/public/index.html
index 090b0d5..0e74a89 100644
--- a/public/index.html
+++ b/public/index.html
@@ -40,5 +40,12 @@
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
+ <script>
+ if ('serviceWorker' in navigator) {
+ window.addEventListener('load', () => {
+ navigator.serviceWorker.register('./service-worker.js')
+ })
+ }
+ </script>
</body>
</html>