how to cache page when going away from it and not cache when return from it
For now, I am using jQuery mobile version 1.3.2. According to the documentation, making a page
data-dom-cache will make the dom bigger and bigger, so I am trying to avoid doing it as much as possible.
But to me, it makes sense to cache a page if going to another page, but not cache it when returning to a previous page. For example, moving form page1 to page2 to page3. When a user moves from page2 to page3, i would like to cache page2 so when the user goes back to page2, he is at the same point when he left page2. Now when he returns to page1 from page2, i would like page2 to be removed from the DOM.
So if I set data-dom-cache="true" on page2, is what I described the expected behavior or page2 is still cached when returning from page2 to page1? I cannot seem to find the answer in the documentation. so if anyone knows the answer, please let me know. Also just in case, it is not the expected behavior, is there a way for me to accomplish what I described? Thanks a lot
ftc