what is the best or recommended way to do a reset of an app.
let's say i want to reset the app after 6 hours. when i change pages, which are loaded via ajax, those pages are inserted in the dom. that is good, as a second call of this page would display it directly and not load it again. but at some point i want to have a clean start.
when i now check - eg. use a cookie to track last display times - how would i reset the app and display just the homepage/index.html?
is it enough to do a location.href? or should i use remove() to find eg. all <divs date-role='page'> which were inserted into the dom?
ok thanks. why will i do this? we have an event calender app. so most of the content will be loaded via ajax requests from our server. there are two reasons:
the most important: i am using jqm in a phonegapp app. there will be no real clean start when the app comes up from background.
for some time it is ok, eg. clicking on a map-link and then coming back to the app, but after that:
1) there are some quite large lists as i have dom-cache enabled. while you are browsing the dom will be filled with lots of html-code so the page will be getting bigger and bigger. so over the time you will have a really big html-file. i will have a way to do some kind of "clean start" to reduce the memory consumption.
2) after some time the information is no longer valid. eg we have a "today"-link. at "some time" today is no longer today, so i need to refresh this page.
first i will do 1), for 2) i will try to implement an expire-function or save an expire-field in the loaded page-div, so that i can decide when or whether to reload the page.
a location.href will not work in a phonegap app. my "app" opens safari and load the index.html. so i will jump out of my app. how can i refresh the page in phonegap? is this somethng with jqm? why is a new browser/safari window opened?
Leave a comment on markusweb's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic