Offline check in Android and IPhone devices
I am designing offline web application for Android and IPhone devices,for offline use i am checking all the application cache events like 

 - cached,checking,loading,error,updateready.



All these things i am checking under **(navigator.onLine || navigator.onLine == "true")** condition,but if connectivity is not there also all the statements under above if condition is executing,so ending up with error event.

Can anybody help me out how robustly  we can check connectivity in the above mentioned scenario(specific to **Android and IPhone devices**)

Thanks in advance

Offline check in Android and IPhone devices
===

I am designing offline web application for Android and IPhone devices,for offline use i am checking all the application cache events like 

 - cached,checking,loading,error,updateready.



All these things i am checking under **(navigator.onLine || navigator.onLine == "true")** condition,but if connectivity is not there also all the statements under above if condition is executing,so ending up with error event.

Can anybody help me out how robustly  we can check connectivity in the above mentioned scenario(specific to **Android and IPhone devices**)

Thanks in advance
