Reputation: 1
I've noticed that there are a lot of different cache issues with jQuery Mobile, but I have been unsuccessful finding a solution to this one. In essence, my app is loading a much older version of a script from a jQuery Mobile page every time the back button is pressed.
The start screen of my app has a search using a few different filters, at least one of them is required. I have a bit of jquery to require this. On the first time a user visits the start screen there is no problem at all, however if the user hits the back button and tries to search again, the jQuery validation is from a version from days ago and no longer works.
The same problem exists on the first load of a page somewhere else in the app, but may not be related.
Details: Latest stable jQuery Mobile (1.1), jQuery 1.7.1.
Upvotes: 0
Views: 1809
Reputation: 5920
If you would like to load a page without pulling the cached version, add data-ajax="false"
to the link.
<a href="page-two.html" data-role="button" data-ajax="false">Page Two</a>
Source: http://jquerymobile.com/test/docs/pages/page-cache.html
Upvotes: 1