Navigator.onLine (Property)

This property tells you whether the browser is online to a network.

Availability:

JScript - 3.0
Internet Explorer - 4.0
Property/method value type:Boolean primitive
JavaScript syntax:IEnavigator.onLine

If you select the work offline mode then this property will return false. It returns true when you go back online. This allows you to write scripts that will operate differently when they are being executed in an offline session.

Property attributes:

ReadOnly