I'm looking for best solution to throttle image download in SPA application.
Problem:
On slow network, when entering details page there's a lot of image downloads happening that are maxing-out browser connections, which breaks(makes unresponsive) UI that requires connections to do AJAX request on button clicks.
I'm looking for some HTTP/browser API to throttle image downloads at given time. Do you know is something like this exists?
Other approach I would like to have is ability to kill all GET request on button click (that could also solve this issue).
I cannot find such APIs. Maybe inserting these images as 'prefetch' could be good idea?
Or I have to "lazy" load these images as <img data-src="url">
and then put them to custom fetcher that does up to 3 request at the time?
EDIT: found some related issues: