navigator.onLine still true when turning off WiFi, false when set "work offline" in browser
Posted
by chimerical
on Stack Overflow
See other posts from Stack Overflow
or by chimerical
Published on 2010-05-06T07:50:46Z
Indexed on
2010/05/06
7:58 UTC
Read the original article
Hit count: 317
JavaScript
|offlineapps
navigator.onLine is still returning true when I turn off Wi-Fi (Airport on my notebook in OS X). This is counterintuitive behavior. But when I set "work offline" in a browser like Firefox, it correctly returns false. Is this expected?
alert(navigator.onLine ? "online" : "offline");
© Stack Overflow or respective owner