Performance is the main con of Phonegap applications when compared to native applications. So optimizing the apps you build with Phonegap is quite important. I’ve been working with phonegap application for the past 1.5 years. here I’d like to share some of my observations & tips on this topic.
The 300ms Delay in touch devices.
Most touch-based mobile browsers wait 300ms between your tap on the screen and the browser firing the appropriate handler for that event. It was implemented because you could be double-tapping to zoom the page to full width. Therefore, the browser waits for a third of a second — if you don’t tap again, the “click” is activated.
If you are developing your app in BackboneJS, you can get rid of this delay by just including Backbone Touch library. All you have to do just include the script below BackboneJs in ur html page.
If you are using AngularJS, angular comes with ngTouch module which disables the 300ms delay.
You can try Fastclick aslo.
By removing the 300ms delay on clicks, you app becomes visibly faster.
Use your own css.
User your own css,. dont go for any css/ui libraries. If you want to make your app responsive, you can try SkeltonCss or The Grid only Bootstrap. That’s you can customize the bootstrap before you download, including only what you need really.
Further tips will be coming soo…