问题
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
- Minimize all the source js and CSS files . This will work for smaller js and CSS files.
- 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