Reputation: 417
Just started with phonegap for an existing page that I've been working on. I had the app written in a native webview, and fully working, but decided to switch to phonegap so I can get an ios/windows version as well.
So everything seems to work but my images.
I'm using jQuery to write the images, works perfectly fine except for when the source is my https:// url, routed with cloudflare
works
$('body').prepend("<img src=\"http://162.250.201.46/download.jpg\">");
doesnt work
$('body').prepend("<img src=\"https://feed-monster.com/download.jpg\">");
I don't really know why it wont load the https images, they work in chrome on my phone, desktop, anywhere, site worked fine in the native webview but refuses to work in phonegap's version.
I'm ok for now since the ip works perfectly fine and the app is just a beta/proof of concept type thing so ssl isnt absolutely required.
Anyone have any ideas why it wont work?
Upvotes: 0
Views: 234
Reputation: 13
I'm trying to reload image:
function imgError(image) {//Костыль CloudDlare SSL
setTimeout(function(){
image.onerror = "";
image.src = image.src+"#";
}, 1500);
return true;
}
<img src='site.com/image.img' onerror="imgError(this);">
Upvotes: 0
Reputation: 417
Always finding the answer.. Must just be an emulation thing. I find phonegap serve versions are not the same as the apk, nice to be quick to dev, not so nice to not provide a 1->1 experience like it says it does.
https images working fine when the apk is loaded.
Upvotes: 0
Reputation: 2087
Do you have anything like Rocket Loader or Mirage enabled in your performance settings? Those can potentially impact JavaScript/jQuery/images.
Upvotes: 1