hello, I develop an application using sencha touch2, and want to make this application offline. I want to know how the cache works on sencha touch 2.x.
My application contains several lists of data.and I want to put these data in the cache after having them loaded. and also update the cache where data change.
Can anyone explain to me, or give me example about how the cache works on sencha touch 2?
if you use the sencha command tool you can build a production build.
the the file resources are cached triggered by the cache manifest which will be generated for you.
you can store your data in the localstorage for offline use and sync it when you back online
I have already seen this article,but I have a problem, I dont create my application using sencha command.I dont have all files.my application is organized following the MVC pattern,but Its not generated by the sencha generate command. Is it possible to add the cache or I should build the application with sencha command ?
the easiest way is to use the sencha command.
if you already have the mvc structure, kickstarting a new project with sencha command and the copy your files in should be such hard.
Ok,I'll create a new project and copy my files. I have another question, can i use localStorage to store data with json format? for now my application is local,and I load data from local json files. is it possible to load data from those files and put thems into the localStorage? I'am bigenner, so am a little confused...
I create an application project with sencha command. Normally, the app.json will automatically create a cache.manifest if i understand?
but when I look at the application resources in the safari console, I have an applicationCache empty. it should contain index.html page no?