Periksa apakah browser online

online = navigator.onLine // boolean
Poised Pig