码迷,mamicode.com
首页 > 其他好文 > 详细

缓存与预取

时间:2014-12-02 01:31:01      阅读:201      评论:0      收藏:0      [点我收藏+]

标签:io   on   ad   html   ef   htm   type   dp   编程   

$.mobile.page.prototype.options.domCache=true;//在mobileinit中设置保存所有先前访问过的网页dom,

另外,缓存只是一个特定的页面,可以在需要缓存的页面容器中添加data-dom-cache=true,

在a链接中添加data-prefetch就可以预取到该链接所指向的页面内容,也可以用编程的方式$.mobile.loadPage(‘a.html‘,{showLoadMsg:false});第二个参数可有可无。

缓存与预取

标签:io   on   ad   html   ef   htm   type   dp   编程   

原文地址:http://www.cnblogs.com/toward-the-sun/p/4136352.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!