Skip to content

Instantly share code, notes, and snippets.

@pieterclaerhout
Last active August 13, 2020 16:09
Show Gist options
  • Save pieterclaerhout/3089280 to your computer and use it in GitHub Desktop.
Save pieterclaerhout/3089280 to your computer and use it in GitHub Desktop.
Check if an iOS device is online or not
<html>
<head>
<title>Check If The Device is Online or Not</title>
</head>
<body>
<script type="text/javascript">
if (navigator.onLine) {
window.location.href = "http://blog.twixlmedia.com/assets/are-we-online/online.html";
} else {
window.location.href = "offline.html";
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment