Checking online status from an iPhone web app

前端 未结 3 806
我在风中等你
我在风中等你 2021-01-03 04:39

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 c

相关标签:
3条回答
  • 2021-01-03 04:42

    img src="http://aonlinesite.com/a-really-little-image.png" onload="Intenet!" onerror="NoInternet!"

    0 讨论(0)
  • 2021-01-03 04:43

    A quick test on the iPhone shows that it is available from iPhone OS 2.2.

    0 讨论(0)
  • 2021-01-03 04:54

    That same code should work in the WebKit nightly build as of May 16th 2008. I guess that means you need to hope the 2.1 update included a new build of safari.

    https://bugs.webkit.org/show_bug.cgi?id=19105

    0 讨论(0)
提交回复
热议问题