<script>
    if ('serviceWorker' in navigator) {
        navigator.serviceWorker.register("{{ "/sw.js" | relative_url }}").then(function() {
            console.log("Service Worker Registered");
        });
    }
</script>