onoffline and ononline Events
What happens when the user is offline?
In order to build a good offline-capable web application, you need to know when your application is actually offline. You also need to know when your application has returned to an 'online' status again. Effectively, the requirements break down as such:
- You need to know when the user comes back online, so that you can re-synchronize with the server.
- You need to know when the user is offline, so that you can queue your server requests for a later time.
It is this process that online/offline events help to simplify.
The DOM onoffline event occurs on offline work of browser. The onoffline event is a conflict with the ononline event.
So, how to check the mode of the browser before firing these events???
Answer to this question will be my next post!!