cordova - Images take a long time to load phonegap application on iOS -


i'm loading set of thumbnails list in phonegap application dynamically. function use load images:

var getuserimage = function(src) {     // render users profile image     var $profileimage;     if ( typeof src ==='undefined' || src === 'placeholder.jpg' || src === '') {         // avoid hitting server         $profileimage = $('<img />', {             class: 'profile-image responsive-image',             src: 'img/placeholder.png'         });     } else {         var imgsrc = $.app.config.imagepath + src + '?width=200&height=200&crop=auto';          $profileimage = $('<img />', {             class: 'profile-image responsive-image',             src: imgsrc         }).one('error', onimageloaderror);     }      return $profileimage; }; 

i modified else statement console.log on images load event. images (each around 10-15kb) take on minute load! isn't server issue, works absolutely find in browser , on android. it's ios that's taking forever.

turns out exceeding number of requests safari browser handle. use long polling in our application , safari web view limits number of concurrent connections single domain.

the solution simple. serve our images different domain (or subdomain) ones use access api. way can increase number of concurrent connections can make.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -