if ('serviceWorker' in navigator) {
  navigator.serviceWorker.register('/js/serviceWorker.js');
}

if ('serviceWorker' in navigator) {
  navigator.serviceWorker.register('serviceWorker.js',{scope:'/'});
}

Update site.js