Is there a way to check if the iPhone is on the Internet from a web application. That is, in mobile Safari, I can check the online status of the device to find out if I should try the AJAX call or not.
In Firefox / regular WebKit, this will be:
if(navigator.onLine)
{
onlineCode()
}
Ted source
share