i have a page with no caching but use preventDefault within pageremove when i want it to stay in the dom.
usually I post to this page via a form and all works well, but i also want to be able to pass query string parameters. i can access these parameters fine, but JQM sees the page as a completely new page so it is no longer cached.
so, how can i get a page with and without query string parameters to be treated as the same page?
at the moment multple page elements with the same id are added to the dom - because of the different querystrings
I have a page with a map (using jquery.ui.map) that accepts a query string. I want to dom-cache the page, so that the user can go to related pages, then return to the map without having to re-build the map. The page takes query string parameters that determine what is mapped.
Problem is, JQM considers that each modification to the query string is a unique page, and so caches the page separately and they accumulate in the DOM. I want JQM to cache just one copy. I'll check the query string, see if it has changed, and modify the map if needed, otherwise do nothing.
So, work-around for now is that I'll just put the parameters somewhere accessible (global object, data-attribute on the map page, etc. and just leave-off the query string. However, that means the user wouldn't be able to bookmark a map with parameters, since there are no parameters. It's OK for now, since initial target is a PhoneGap app, so won't be an issue, but also need to do this as a website, so would be nice to be able to bookmark map pages.
Looked at the page params plugin, but not quite right for this.
Has anybody done something similar? I need for JQM to cache just one copy of the page, regardless of the query string, but retain the query string in the browser navbar.
Leave a comment on watusiware's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic