PrepAway - Latest Free Exam Questions & Answers

Which method should you use?

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?

PrepAway - Latest Free Exam Questions & Answers

A.
Option A

B.
Option B

C.
Option C

D.
Option D

Explanation:
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
Navigator onLine Property

One Comment on “Which method should you use?


Leave a Reply