1

I am wrining a web app, which loads a bunch of images from a server. I've set up .onload() and .onerror() on each images, so I can monitor the "image download lifecycle". Even I've set up a setTimeout(), so I can detect timeout, too.

Upon timeout, I should abort the request. Browsers have limit on image request per same domain, and the stucked images should eat this limit up, pausing further image downloads.

I've tried delete the image element, remove from the DOM, setting new value to .src attribute, but neither helps. So, the question is: what is the official or non-official dirty way to abort http request of the img DOM element?

ern0
  • 3,062
  • 23
  • 35

0 Answers0