I have a simple app (server-side data) that starts with a list of dynamic items (they change periodically). Each item can be edited. So... Click an item, it loads in a new view (good). Problem is, from that new [edit] view, when I click cancel or the back button, the main list items are not refreshed -- that is, the most current state is not used, it appears JQM caches it in the DOM.
Is there a simple way to make parent pages reload when they are visited from the Back button?
Anyway, here is my code:
INDEX
<div data-role="page" data-dom-cache="false">
<div data-role="header"><h1>MAIN</h1></div>
<div data-role="content">
<ul data-role="listview" data-inset="true" class="ui-listview ui-listview-inset ui-corner-all ui-shadow">
<li class="ui-li ui-li-static ui-body-c ui-li-has-count"><a href="item1.php">Item 1 <span class="ui-li-count ui-btn-up-c ui-btn-corner-all"><?php echo microtime(true); ?></span></a></li>
<li><a href="item2.php">Item 2</a></li>
</ul>
</div>
</div>
(Note the microtime stamp on the count bubble.)
(I click Item 1, page slides into view)
<div data-role="page" data-add-back-btn="true" data-rel="back" data-dom-cache="false">
<div data-role="header">
<h1>Trips</h1>
</div>
<div data-role="content"></div>
</div>
(I click back button, main page slide back into view... but the micro time stamp is not refreshed... So the main page is cached in the DOM instead of being reloaded -- which is what I need.)
So... child links do not cache, but pages that I click Back to, they are cached. How can I force JQM to reload?
...Rene