I am using angular (in case it matters) and am trying to limit the number of ajax POST requests that my browser makes using javascript - ideally vanilla javascript on xmlHttpRequest
object. Any ideas would be greatly appreciated.
Edit 1:
To be more precise, suppose I click a button which typically triggers 15 concurrent POST requests - one for each say, "record". I would like to limit these concurrent requests to be 5 at max. Is there a low level (i.e. javascript xmlHttpRequest
) to limit the number of these requests? It is also safe to assume the using is always going to be using either chrome or safari as this is an internal tool.
Copyright Notice:Content Author:「dipole_moment」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/31882937/how-to-limit-the-number-of-ajax-post-requests