A way to simplify and limit concurrent ajax requests
A conversion and queue technology, applied in the field of Web program development, can solve problems such as shortage, and achieve the effect of easy processing, simple and efficient ajax request control mode
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment approach
[0026] The first step is to organize the ajax request queue and parameters. The parameters are as follows:
[0027]
[0028] Use the above-mentioned parameter config to call the function encapsulated in the present invention (compatible with AMD, commonJS, var and other introduction methods, described in the simplest var method) rbAjax(config).
[0029] In the second step, use config to call the internal _dequeue method, the process is as follows:
[0030] (1) Use config.queue.splice(0, config.limit) to extract the parameters of the first two ajax requests in the queue.
[0031] (2) Traverse the extracted ajax parameters and execute the following logic: merge the incoming parameters with the default parameters to obtain a final parameter cache, remove the parameters not used by $.ajax, and add ajax-id to the data passed to the server by ajax , which is the id value of the current ajax. Detect whether the ajax request that the current ajax request depends on is executed su...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


