Hi,
It has become apparent to me that my response to this last week
bounced. Apparently I am not familiar with some limitations of Gmail
for Mobile on iPhone. Shame on me. :-(
On Jul 18, 10:31 am, tazz_ben <
b...@wbpsystems.com> wrote:
> Sorry if this is a dumb question, I'm working on my first Gears/HTML5
> app right now.
HTML5/Gears etc. is very confusing. There are no dumb questions.
>
> Am I correct in believing there is no lightweight method that gives
> you the online/offline state in Gears and HTML5 (and by extension no
> wrapper in WSPL)? I've searched for that but haven't found anything.
So up to Iphone OS 2.2.1, the only way to tell is to try to connect to
the server like you say below. At some point (I have not tried this
on OS3 yet because we still support 2.2.1) the online and offline
interfaces listed here:
https://developer.mozilla.org/En/Online_and_offline_events
will come to (mobile)webkit and android.
>
> From what I've read, people seem to think the way to do this do an XHR
> and wait for a failure. Maybe it is that I'm missing something
> fundamental about how XHR works when offline, but this seems very
> inefficient (the OS would have a lot info like local IP to indicate an
> offline state that wouldn't take the time of a request). Am I missing
> something here?
You are not missing anything other than a very annoying oversight in
earlier webkit versions.
Rob.