开发者

jQtouch + Phonegap: Document head setup

I've recently built a webapp using jQTouch & packaged in PhoneGap (both latest versions). I'm now attempting to optimise the app, and was hoping to get some information on how to correctly 开发者_如何学运维setup the of the document.

Currently I simply have the jQTouch javascript (no phonegap.js), and it seems to package and run ok on the iphone. Is there a best practice when setting up the for this combination (ie. should i include the jqt.js & jqt initialisation; phonegap.js & initialisation; or both)

Issues I'm experiencing with the app (which may or may not be related to the above):

  1. App has a long load time - loading screen is about 10second wait (accelerometer & gps turned off in phonegap)

  2. App is incredibly slow (unusable) on iPhone 3G + iOS4.

    NB: Works just fine in iPhone 4 + ios4, iPhone 3G + iOS 3, and iPhone 3GS iOS4.

Thanks! Glen


A good option that you could use now would be Zepto.js, it's a jQuery-compatible library that was built to be light-weight in order to fix these types of performance issues.


I'm kinda behind where you are at the moment - I've written one simple phonegap based app using jquery/jspec/phonegap, and it appears to work pretty well...but I've only tested it on the iphone 4 simulator (haven't registered with the apple developer program yet). Curious to see where you get with this.

I had heard (from a direct competitor, so take it with a grain of salt) that jQuery might be 'slow' on the iphone - maybe xUI is the right way to go? http://xuijs.com/

I'm sticking with jQuery til I know different.


I'm assuming you're using the 'min.js' in your final releases?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜