Navigator onLine Property
Navigator Object
Definition and Usage
The Navigator onLine property determines whether the browser is online, returning 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:
Navigator Object Other Extensions