It should - what you are seeing is probably related to this issue: https://issues.apache.org/jira/browse/CB-2096
On Tue, May 21, 2013 at 2:52 PM, Ray Camden <[email protected]> wrote: > Are you sure? I built a demo a while ago to show connection handling, and > I had to check during start up as well as use events. I just tested with > PhoneGap 2.6 and Ripple, and on Chrome, it did *not* fire an event handler > for network change when the app started. > > > On 5/20/13 4:05 PM, "Shazron" <[email protected]> wrote: > > > >> * Do relevant online/offline events fire when the app starts up, or > >> only when a change is detected during execution? The text for the > >> offline event iOS quirk implies the former case: "During initial > >> startup, the first offline event (if applicable) takes at least a > >> second to fire." If it fires when the app inits, is the value of > >> navigator.onLine true or false during that 1-second delay? > >> > >> > >During both startup and when a change is detected. > > > >navigator.onLine is tied to the connection API: > > > https://github.com/apache/cordova-js/blob/2d15c4045aab52f8b2d728bd90244894 > >258b3b47/lib/common/plugin/network.js#L30-L34 > > > >During that iOS delay, it will be 'unknown' then after it should reflect > >the right value. > >
