loading...

re: Share a quick tip you learned about web dev this year VIEW POST

FULL DISCUSSION
 

I recently found an article describing online/offline detection. It's as easy as:
window.addEventListener('online', () => console.log('online'))
Works for 'offline' events too. You could also check for 'navigator.onLine'

 
Code of Conduct Report abuse