DOM:window.navigator.onLine
From MDC
Contents |
[edit] Summary
Returns a boolean value indicating whether the browser is online or not.
[edit] Syntax
online = window.navigator.onLine;
onlineis a booleantrueorfalse.
[edit] Example
alert(navigator.onLine ? "You're online" : "You're offline");
[edit] Notes
See Online/Offline Events for a more detailed description of this property as well as new offline-related features introduced in Firefox 3.
[edit] Specification
DOM Level 0. Not part of any standard.
Described in the HTML 5 Working draft