jQuery throttling and queuing of AJAX requests

后端 未结 5 1605
庸人自扰
庸人自扰 2021-01-04 11:42

I\'m interacting with an API that allows one action per 5 seconds. However, I want to ensure all requests end up with the host. How can I queue and throttle the requests tha

5条回答
  •  星月不相逢
    2021-01-04 12:18

    I would highly recommend this plugin for throttling Ajax requests: http://benalman.com/projects/jquery-throttle-debounce-plugin/

提交回复
热议问题