madzilla
madzilla

Reputation: 352

jQuery Mobile - Any way to not cache a page?

I've got a page that is dynamically updated after an AJAX call. It seems that jQuery Mobile loads the cache during the initial load of the page. If I revisit the page it always displays the initial version and not the updated page.

Is there anyway to force a page to refresh the cache or to simple perform a new request every time?

I have already tried adding data-ajax="false" to the anchor, which works but disables the transition animation so I'm still looking for other options.

Upvotes: 1

Views: 370

Answers (1)

j08691
j08691

Reputation: 208032

Couldn't you add a parameter to your AJAX URL that will change each time? Something like:

&nocache="+new Date().getTime();

Upvotes: 3

Related Questions