PDA

View Full Version : Detecting sencha offline



KPChow
15 Sep 2011, 1:32 AM
Hi guys,

I searched through this forum and couldn't find any threads relating to my question, nor did the API document.

Since Sencha can detect platforms and devices, is there a way to detect if it's offline, or is that wishful thinking from me? :">

K

mitchellsimoens
15 Sep 2011, 4:50 AM
All you have to do is check this property:


window.navigator.onLine

It's boolean so true would mean you are online and false would mean you are offline.