diff options
-rw-r--r-- | index.html | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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"> |