jQuery Mobile - stop caching

jquery, jquery-mobile

Solution

You can specify to not cache the page like this :

<div data-role="page" id="page-detail" data-dom-cache="false">  
    ....
</div>

Update

In fact it is `data-dom-cache=false`, available for page, link and dialog

Doc http://jquerymobile.com/demos/1.2.0/docs/api/data-attributes.html

If you want avoid data prefecting for all pages, have a look here : How does one disable Caching in jQuery Mobile UI

Problem

In my case links loading into a special div's wrapers which are parents of its links. I do it through `pageload` event. All is ok when JQuery Mobile does AJAX requests. But if I click on visited link, jquery mobile doesn't send the request, but show me blank page, replace `#page1` content from cache in other words. I need these requests. UPD Events `pagebeforeload`, `pageload` dont appear in cache case. =\

Original source

Related problems