<script>
if ('serviceWorker' in navigator) {
    window.addEventListener('load', function () {
        navigator.serviceWorker.register('{{ asset('public/sw.js') }}').catch(function () {
            // Registration failure should not block the app experience.
        });
    });
}
</script>
