What are common sources of PhoneGap with jQuery Mobile performance issues?

前端 未结 8 1842
既然无缘
既然无缘 2021-01-30 18:14

I have an application written using PhoneGap 1.0 and jQuery Mobile 1.0b2 running on iPhone and iPad.

Ever since I started using the framework, I have been plagued by per

8条回答
  •  独厮守ぢ
    2021-01-30 19:06

    I've had some success with removing text and box shadow, which is some fairly simple CSS:

    .ui-shadow, .ui-btn-up-a, .ui-btn-hover-a, .ui-btn-down-a, .ui-body-b, .ui-btn-up-b, .ui-btn-hover-b, .ui-btn-down-b, .ui-bar-c, .ui-body-c, .ui-btn-up-c, .ui-btn-hover-c, .ui-btn-down-c, .ui-bar-c, .ui-body-d, .ui-btn-up-d, .ui-btn-hover-d, .ui-btn-down-d, .ui-bar-d, .ui-body-e, .ui-btn-up-e, .ui-btn-hover-e, .ui-btn-down-e, .ui-bar-e, .ui-overlay-shadow, .ui-shadow, .ui-btn-active, .ui-body-a, .ui-bar-a {
        text-shadow: none;
        box-shadow: none;
        -webkit-box-shadow: none;
    }
    

    As Shane G said, the Nitro JavaScript engine is not used for UIWebViews in pre iOS 5.0 releases however on devices that have iOS 5.0 or greater the JavaScript engine will feel about twice as fast in native apps and homescreen-web-apps.

    There is always the option of creating a HTML5 cache manifest so you're website can function offline but still be run in Safari: http://www.html5rocks.com/en/tutorials/appcache/beginner/

提交回复
热议问题