android - Dynamic Caching of Data in JQuery Mobile, PhoneGap Application -
i finished reading few sparse tutorials on caching/offline , making apps responsive when user not connected internet. quite interesting cause have beingness wondering how apps have beingness doing cause thinking database manipulation.
i relatively new caching mechanism , want implement in next project cause still learning.
the few tutorials have read talks caching static files pictures, .css files, .js files etc
my question this;
**question 1** how cache dynamic files e.g have apps when user want view profile, implement sending ajax request server populate profile page pictures , other profile details (texts). how cache these texts , pictures since dynamic?
**question 2** using different page (index.html, profile.html) jquery mobile mechanism, impact caching in way because have refresh page every time navigating new page show styling correctly?
this question may sound noob want larn , have read lot caching these question not addressed. hope helps. thanks...
answer given based on knowledge far.
1) can store / cache things localstorage
it's preety basic won't take lot of time or coding or mechanism implement. profile data, image encoded string can saved in localsorage. first save profile info in localstorage. next time after app starts can load info localstorage , in mean time can create async ajax phone call server check if info modified. if so, can bring info 1 time again , update localstorage.
2) if utilize localstorage page transitions won't matter until reach localstorage size limit of 5 mb.
android jquery html caching cordova
No comments:
Post a Comment