android performance jquery phonegap issue

ε祈祈猫儿з 提交于 2019-12-18 12:43:23

问题


We are developing an Android application using phonegap 1.1.0 and jquery 1.0rc1 minified file. The performance is very slow in the android device.DOM loading takes time to load.How do we optimize the dom loading in Android


回答1:


Yeah, Android's web view is not exactly optimized for some of the fancy things that jQuery does. My advice is to try the latest version of jQuery as they just released version 1.0. As well you can try disabling some of the effects to get some performance benefits.

<script type="text/javascript">
   $(document).bind("mobileinit", function() {
       $.mobile.autoInitializePage = false;
       $.mobile.defaultPageTransition = 'none';
       $.mobile.touchOverflowEnabled = false;
       $.mobile.defaultDialogTransition = 'none';
       $.mobile.loadingMessage = 'Daten werden geladen...' ;
   });
</script>


来源:https://stackoverflow.com/questions/8208679/android-performance-jquery-phonegap-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!