Discussion Forums  >  WebViews and HTML for Mobile

Replies: 2    Views: 113

sepala
Aspiring developer
Profile
Posts: 196
Reg: Nov 23, 2011
London
3,060
04/28/12 03:27 PM (13 years ago)

Caching a HTML

Hi I have a page in an app that is an HTML document that uses JavaScript to create a ToDo list using forms and tick boxes. What i want to do is save any changes the user makes to the page so when they leave this page and come back (and the HTML doc is reloaded) the changes they made are still there... I have set up another page that saves data perpetually using SQLite but this is SO complicated and I hope that I can achieve the above by just caching the data. The data doesn't need to be saved perpetually (so if the close the app it is ok if it reverts to the original HTML doc) but I just want to cache it so that it stays the same whilst they have the app open. Any ideas...?
 
ceerup
Code is Art
Profile
Posts: 1033
Reg: Oct 10, 2011
New York City
16,380
like
04/28/12 04:53 PM (13 years ago)
im trying to do the same thing, i have a calculator that i want the user to have the numbers they entered last stay there when they exit the app and come back...i cant figure it out
 
Rohan
Veteran developer
Profile
Posts: 79
Reg: Mar 12, 2011
London
10,040
like
05/18/12 11:17 AM (13 years ago)
I have a similar problem, trying to retain user input by clicking checkboxes. I've tried good old fashioned cookies but that doesn't seem to work within a UIWebview. I know that xcode allows for local storage of cookies per app, but not sure how to implement this. Also tried HTML5 local storage, although again can't get that to work. Seems like there is also a problem with iOS 5 allowing the apps cache to be cleared if there is too little space left, so effectively your save data is wiped at random. Not tried the SQLite approach as it seems way too complicated a solution just to store a couple of variables. Will let you know if I can figure out a solution.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.