Reputation: 16142
I am working on Phone Gap from last few days and its good platform to build cross platform application.
my issue is each and every HTML pages takes too much time to load. i am simple using Jquery mobile design for UI.
When i was testing in emulator then i thought it would be cause due to emulator but its same in device also.
It always take 7 to 8 sec to load and show page.
How can i reduce it ? Is there any thing that i should care for it if yes then please let me know.
Hope you guys will guide me.
Upvotes: 1
Views: 1482
Reputation: 894
I have been develop phonegap + JQM. I think JQM very slow if you use many many component. Ex: listview,.. I had problem as you and i was research, find in many forum. Finally, my solution i used to fix is not use origin component's JQM then improve it. I only use structure of JQM (it very useful with multiple page in one page).
<ul data-role="listview">
<li></li>
</ul>
//It very fast
<ul>
<li></li>
</ul>
You must use JQM very care, because it will make your app very slow to load and manipulate. You must improve DOM and JS to have performance. Hope useful for you.
Upvotes: 0
Reputation: 710
Can you provide some of the code? that will give more information. Something you can also do is to create a custom build of jquery mobile. (click here)
With this custom build you can leave out stuff you don't need and this will reduce the filesize of the javascript, but I don't think that's the overall problem.
Upvotes: 1
Reputation: 1
jQuery Mobile uses many css.
have you tried download jQuerymobile.js, jQuery.js and the css and put it in a directory? So the device need not be connected to internet to download jquery and css resources.
Be sure that the references to jQuery,etc. are ok.
Good luck!
Upvotes: 0