1. In jquery Mobile, the historical content accessed through the page cache can be written to the cache of the page document, and when the user re-accesses it, it does not need to be reloaded, as long as it is read from the cache.
2. To set the page to be cached, simply add the Data-dom-cache property to the page container and set the property to True. There is another way to set up a cache page in jquery Mobile, which is to set a global jquery Mobile property value to true with JavaScript code such as $. Mobile.page.prototype.options.domcache=true
3. Sample code:
<! DOCTYPE HTML >
<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" >
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<meta name= "viewport" content= "width=device-width,initial-scale=1"/>
<link href= "Css/jquery.mobile-1.2.0.min.css" rel= "Stylesheet" type= "Text/css"/>
<script src= "js/jquery-1.8.3.min.js" type "Text/javascript" ></script>
<script src= "Js/jquery.mobile-1.2.0.min.js" type= "Text/javascript" ></script>
</HEAD>
<BODY>
<div data-role= "page" data-dom-cache= "true" >
<div data-role= "header" ><div data-role= "Content" >
<p> This is a cached page </a></p>
</div>
<div data-role= "Footer" ></div>
</BODY>
</HTML>
4. Preview of Effect diagram: