Cordova start app very slow

雨燕双飞 提交于 2020-01-24 00:12:08

问题


I build an app with cordova. The app itself is very fast. But the start of the app(the time from the click on the button till the first screen shows ) it more then 8 sec.

How can I make it faster?? I know that many apps wrote with cordova and I dont think that it take 8 sec for those apps.

I dont need any feature of cordova only internet access and show the page. no camera no permissions..

Thanks


回答1:


Keeping all the sources locally also won't help you much.

You have two options

  1. Minimize all the source js and CSS files . This will work for smaller js and CSS files.
  2. For larger js and CSS use lazy loading. In this load as few resources as possible at start of app. Later whenever is required load other resources.

Consider one more thing, create a single page web application. Switching from one page to another during app execution gives a bad user experience.



来源:https://stackoverflow.com/questions/32772276/cordova-start-app-very-slow

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