I'm in the process of building a sencha app that will have a fall back offline feature. Looking at a few other discussions and articles it appears there are a few different ways of detecting internet connectivity and when it's it lost.
The basic suggestion was using:
Though reports say this is usually based off if a device is in airplane mode or offline mode rather than if there is an actual drop in connectivity.Code:navigator.onLine
I'm thinking the best route might be to set some sort of ping function to the server in which I'm grabbing JSON data from, then setting an aggressive timeout for it. If the time out is met then I can call a function to change the header and alter the content displayed. At least that's what I'm thinking and wondering if anyone has already built something along these lines?
Am I missing any other built in functions that might be able to easily do this? Any other recommendations?
Thanks in advance!