JavaScript Window navigator.onLine
JavaScript Window navigator.onLine
The onLine property is used to return true if the browser is online else it will return false. It is a read-only property. It is an unreliable property because a computer can be connected to a network without internet access.
Syntax:-
Its syntax is:- navigator.onLine
Return:-
Its return is:- true if the browser is online else false