jQuery & Phonegap issues with preloading DOM -


i've been diving google , stackoverflow before, didn't find solution this.

my issue following: i'm using phonegap (cordova 3.0) , jquery mobile 1.3.1 android.

before first view loads i'm experiencing white screen, guess dom initializing before images loaded on top.

i changed background black, 1 still white.

what want achieve? when view not loaded completely, background should black user has experience of "the app hasn't started yet".

update 1: javascript code in onload , deviceready:

<body onload="onload()">     <script type="text/javascript">         function onload() {            document.addeventlistener("deviceready", ondeviceready, false);         }         function ondeviceready() {             ... code         }     <script> </body> 

unfortunately no changes.

i found out amount of time white screen displayed minimized after second app launch because of caching.

my architecture following: overgo timeout error i've got index.html following structure in addition increased timeout value in main file.

main.java super.setintegerproperty("loadurltimeoutvalue", 10000);

index.html

<html> <head>         <title>title</title>     <style type="text/css">             .ui-page {                  -webkit-backface-visibility: hidden;      }         </style>         <script>         window.location.href="./main.html";     </script>        </head>  <body>       </body> </html> 

this redirection actual file images etc loaded. no splash.

the white screen occurs after that, when loading main.html needs long time load (multipage jquery). in first app start it's 1 second white screen. after seems cached , takes <~100ms.

is possible pre-cache webapp?


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -