Is there a way to check to see if an iphone is online from a web app. That is, in mobile safari, can I check the online status of the device to see if I should try an ajax call or not.
In firefox/regular webkit, this would be
if(navigator.onLine) { onlineCode() }