Check and detect which browser serviceWorker is not active
Unanswered
Macao paper wasp posted this in #help-forum
Macao paper waspOP
im searching for a way to check and detect if the browser serviceWorker is active or not
im trying with this useEffect but its not working
im trying with this useEffect but its not working
if ('serviceWorker' in navigator) {
navigator.serviceWorker.ready
.then(() => {
console.log('Service Worker is ready'); // Service Worker is active and ready
})
.catch((error) => {
console.log('Service Worker registration failed:', error); // Service Worker registration failed
});
} else {
console.log('Service Worker not supported');
}