View Full Version : How Sencha Touch Works When Offline

23 Oct 2010, 8:42 AM
I have a question. If you have a response and can explain it as if you were talking to a non-techie business person then that would help, too.

As I understand it there is no binary running on the mobile device itself and most of the functionality and logic is based on the server via the Sencha libraries. So my question is: how useful or appropriate is it to use ST for situations where there's no connectivity and the User is offline? For example, let's say I need a scheduler app where the schedule is largely unchanged form day to day. Can I get the schedule info WHEN I'm online, close down the app, but hours later when I am offline then still have it available just by launching the app?

Or if connectivity is sketchy, could I get the update to any schedule changes only during those moments when I AM back online?

Also, another scenario for another app: I am connected and have videos to stream on a server. Are there limitations to the video codecs/formats I can view on ST?

23 Oct 2010, 4:39 PM
The following is a link to a app working offline

Here what we do is, make a manifest file which list all the files we want to cache on the device. So once these
files are cached, they will not be requested again from the server but use the cached file. As for the data,
in HTML 5 we are allowed to created databases in the browser, were we can store data.
So both the data and files combined allow us to make a web app work offline.

There is a command in javascript name navigator.offline. It is a true/false value, based on it value you can
determine to work off the server database or the browser database.
Thats pretty much it.