DEV Community

Discussion on: πŸš€ Detecting If a User is Online/Offline with JavaScript

Collapse
 
shaijut profile image
Shaiju T

Thanks, Short and to the point article. I think most PWA apps does this.

Collapse
 
nialljoemaher profile image
Niall Maher

Not without diving into a service worker. It'll also only catch when network requests succeed/fail so you could add this to a PWA to create a richer experience. So this will actually update your UI when your connectivity changes rather than when you're actually making requests.