I am implementing jquery.min.js in my phonegap app but it is showing me the CordovaWebView time out error. I have also tried
super.setIntegerProperty("loadUrlTimeoutValue", 10000);
but it is just taking the time and after that time ,the same "CordovaWebView: TIMEOUT ERROR!" is coming. Please provide me with proper solution.
I guess your main script is too long to execute :
//code executed after the loading of the page (if your using jquery)
$(function() {
//if this method is too heavy and takes too long to execute, it will trigger the TIMEOUT ERROR.
doSomeStuff();
});
Won't may want to add a timeout on this method in order to let the application launch, then start your heavy script (you may want to display a loading image or something like that).
code snippet :
//code executed after the loading of the page
$(function() {
//in mobile environment, this timeout leaves time for the app to launch before we start any heavy process.
setTimeout(function(){
doSomeStuff();
},100);
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With