Using navigator.onLine and online/offline events to check for connectivity. | Heykuki News