Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

Service Worker Navigator check

<script>
// Check that service workers are supported
if ('serviceWorker' in navigator) {
  // Use the window load event to keep the page load performant
  window.addEventListener('load', () => {
    navigator.serviceWorker.register('/service-worker.js');
  });
}
</script>
Source by laravel-mix.com #
 
PREVIOUS NEXT
Tagged: #Service #Worker #Navigator #check
ADD COMMENT
Topic
Name
3+1 =