Easy Tutorial
❮ Met Canvas Stroke Jsref Setseconds ❯

Navigator onLine Property


Definition and Usage

The Navigator onLine property determines whether the browser is online. It returns true if online, otherwise false.

Navigator onLine is a read-only property.


Syntax

navigator.onLine

Return Value

Type Description
Boolean Returns true if online, otherwise false.

Browser Support

All major browsers support the onLine property.

Chrome IE Edge Firefox Safari Opera
Yes Yes Yes Yes Yes Yes

Example

Display all browser properties:

let online = navigator.onLine;
❮ Met Canvas Stroke Jsref Setseconds ❯