On a recent project, I used ajax to render a full cell of a table upon clicking it. I found that without some kind of queue, my clients would click on a bunch to expand them, but only the first would render. Mootools offers a plugin in mootools more called
Request.Queue, but that wasn’t what I was looking for, since there was only a single Request object involved, not multiple.
I was reading the documentation of Request to see if I missed something, because I thought this was core functionality. Apparently, there is something built into mootools more that does just that, it chains requests, literally forming a queue.
Straight from the options of
‘chain’ – Any calls made to start while the request is running will be chained up, and will take place as soon as the current request has finished, one after another.
Adding that option to Request worked perfectly, so I was able to click on a bunch of table cells and let them render freely.
I think that there should be a note in
Request.Queue that there is already functionality for repeated requests with the same
Request object built into the core.