【发布时间】:2014-07-20 05:37:12
【问题描述】:
我在localMemory中保存了长字符串UserContacts,但是访问数据需要很长时间,这是我正在使用的代码:
var $Contacts = $('#Contacts');
var htmltext = window.localStorage.getItem("UserContacts");
$(htmltext).appendTo($Contacts);
$Contacts.listview("refresh").listview();
任何想法如何提高性能?
附言我正在为 android 开发应用程序并使用 PhoneGap。
谢谢。
【问题讨论】:
-
如果这是一个简单的html内容,那么你可以将它保存在另一个html文件中,并可以使用jquery加载
标签: javascript android jquery cordova local-storage