views:

567

answers:

2

Does Safari have anything equivalent to the HTML 5.0 spec for window.navigator.online?

http://www.whatwg.org/specs/web-apps/current-work/#browser-state

If not are there any alternatives to polling to establish connectivity state?

My question pertains to Safari 4.0+ and iPhone software 2.1+

A: 

Yes. I think it's been in Safari from 3.0 but I haven't checked. A quick test on the iPhone shows that it is available from iPhone OS 2.2.

pr1001
+1  A: 

It's there, but it apparently isn't working (for me, on iPad with iOS 3.2.2). My code is showing it is always returning true, in both airplane mode and with the wireless explicitly turned off (I don't have 3G turned on). If someone else on an iPad has this working, I'd be interested in hearing about it.

It'd also be nice if Apple adopted navigator.connection (see link text), but that will obviously be a cold day in Hades before that happens.

Jim