I am developing a web app using JQuery Mobile (version 1.4.5) and PHP and I am having problems with using JQuery Mobile's AJAX-based navigation (HIJAX). Most of my application is dynamic and JQM often displays cached versions of the pages that have been visited previously. I have tried the following to prevent caching:
- $.mobile.page.prototype.options.domCache = false;
- HTML meta cache tags
- data-dom-cache="false" when defining JQM pages
- $.ajaxSetup({ cache: false });
- data-ajax=false (works!)
The only thing that fixes the problem is to use data-ajax=false
, which is not ideal because my iOS web app pops out into safari whenever it encounters hrefs (I have found another work-around for that, but still not ideal). Can anyone help me figure out how to force JQM to refresh while doing AJAX-based navigation?
Update: The web app uses single page navigation, not the multi-page per file system.
Thanks!