aboutsummaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2018-01-21 17:12:14 +0530
committerGitHub <noreply@github.com>2018-01-21 17:12:14 +0530
commit5c2f28983b2fe983471677650f102067bee14445 (patch)
tree927a7d807cfa9c0be739fab698fd7ddb1f671eb4 /index.html
parentccc72d6cb0446a150a2bbe2e780daa64226d9453 (diff)
Update index.html
Diffstat (limited to 'index.html')
-rw-r--r--index.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/index.html b/index.html
index 592cb44..451aa8f 100644
--- a/index.html
+++ b/index.html
@@ -2,6 +2,17 @@
<html lang="en" >
<head>
+<script>if ('serviceWorker' in navigator) {
+ window.addEventListener('load', function() {
+ navigator.serviceWorker.register('/sw.js').then(function(registration) {
+ // Registration was successful
+ console.log('ServiceWorker registration successful with scope: ', registration.scope);
+ }, function(err) {
+ // registration failed :(
+ console.log('ServiceWorker registration failed: ', err);
+ });
+ });
+}</script>
<meta charset="UTF-8">
<meta name="referrer" content="origin">
<meta name="Description" content="Hi! This is my personal website and it also houses comprehensive guides about my projects">