Removing an image from the DOM is not yet fully loaded: is the transfer interrupted?

An image (not cached) is added to the DOM; for example (using jQuery):

$('#hereItGoes').append('<img id="theImage" src="image.jpg" />');

The browser starts loading the resource, it takes some time ...

Before the image is fully loaded , some event triggers a callback that deletes the image.

$('#theImage').remove();

Is image resource transfer interrupted?

In particular, does this to stop the transfer of server data (images)?


To ask some "context" to the question:

the long scroll page is often intended for lazy images: only when loading images into the viewport; since each one is ready, then disappears and is displayed to the user.

Now, if the user quickly scrolls the page?

, ( ), , .

( ).

+4
1

, . , , , DOM.

, , , , .

DOM , .

0

Source: https://habr.com/ru/post/1611337/


All Articles