Online & Offline Status API allows web apps to detect whether the browser is online or offline.
By default, we have already implemented a functionality using this API. Whenever your app goes online or offline a toast message will appear.
app.on('online', function() {
});
app.on('offline', function() {
});