javascript - IE10 aborts image downloads -


i trying cache couple hundred large images (each image 2000x2500, 350kb) display in web application. basic process create image object each, set src, , wait download. use image object load image when needed application.

<!doctype html> <html> <head> <script type="text/javascript">     var countspan, errorspan;     var imagearray = new array();      var index = 0;     var imagecount = 199;     var concurrent = 4;      var count = 0;     var error = 0;      function runtest() {         countspan = document.getelementbyid('countspan');         errorspan = document.getelementbyid('errorspan');         next();      }      function next() {         while (index < imagecount && concurrent > 0) {             downloadimage('images/' + index + '.jpg', index);             index++;         }         countspan.innerhtml = count;         errorspan.innerhtml = error;     }      function downloadimage(src, index) {         concurrent--;         var image = new image();         imagearray[index] = image;         image.onload = function() {             concurrent++;             count++;             next();         }         image.onerror = function() {             concurrent++;             error++;             next();         }         image.src = src;     } </script> </head>  <body onload='runtest()'>     <p>downloaded: <span id='countspan'></span></p>     <p>errors: <span id='errorspan'></span></p> </body> </html> 

this works great in firefox, chrome, safari, , ie9. however, ie10 abort connections half way through. example, if attempt download 200 of these images, ie10 download 100 (~35mb of data) error out on remaining 100. network capture tab shows connections aborted. see iexplore.exe process open tcp connections, close them when images begin error out.

if attempt download 200 smaller images (640x480, ~45kb) works.

if don't hold on reference image

// imagearray[index] = image; 

ie10 downloads 200 images. defeats purpose.

it seems me ie10 has size limit on image references. cannot find documentation support this. if can provide link documentation defining limitation or provide workaround appreciated.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -