Skip to Content
0
Former Member
Oct 02, 2016 at 07:08 AM

How to Minimize Apache Cordova App loading time

116 Views

I am new to Cordova apps,Right now I am developing an app on SAPUI5 using cordova, When I run it on android its taking 7-8 seconds to load,I tried minify css and js but it didn't help.Here is my HTML code.


-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>

<script src="resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.m"
data-sap-ui-theme="sap_bluecrystal">
</script>
<!-- only load the mobile lib "sap.m" and the "sap_bluecrystal" theme -->

<link rel="stylesheet" type="text/css" href="Style/myCSS.css">

<script>
var user = "xxxx";
var pass = "xxxx";
var gatewayLoginLink = "proxy/http/xxxxxx/sap/opu/odata/sap/xxxxx";
sap.ui.getCore().setModel(new sap.ui.model.odata.ODataModel( gatewayLoginLink, true, user, pass));

</script>


<script>
sap.ui.localResources("qrcode");
var app = new sap.m.App({initialPage:"idqrcode1"});
var page = sap.ui.view({id:"idqrcode1", viewName:"qrcode.qrcode", type:sap.ui.core.mvc.ViewType.XML});
app.addPage(page);
app.placeAt("content");
</script>
<script type="text/javascript" src="cordova.js"></script>

</head>
<body class="sapUiBody" role="application">
<div id="content"></div>
</body>
</html>


-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


How can I minimize it to 2-3 seconds.Please help.