You are developing a web application that can function when users are not connected to the
Internet.
You need to check the Internet connectivity status of a user’s browser.
Which method should you use?

A.
Option A
B.
Option B
C.
Option C
D.
Option D
Explanation:
Answer is D.
0
0
Right is D
From: http://www.w3schools.com/jsref/prop_nav_online.asp
“The onLine property returns a Boolean value that specifies whether the browser is in online or offline mode.”
1
0
Actually, none of the above are correct. As freedeveloper stated, navigator.onLine gives the desired result, not navigator.online.
0
0
if(navigator.onLine) { alert(‘on line!’) ; }
works for me…
0
0
Correct Answer = D
http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_nav_online
0
0
Correct Answer = D
0
0
Explanation/Reference:
Navigator onLine Property
The onLine property returns a Boolean value that specifies whether the browser is in online or offline mode.
Example
Find out whether the browser is online:
var x = “Is the browser online? ” + navigator.onLine;
The result of x will be:
Is the browser online? true
Reference: Navigator onLine Property
0
0