Reusing XMTHttpRequest object?
问题 I am trying to rewrite some ajax code to make it fit better with the needs for autocomplete. In that situation you have to abort a previous request sometimes, xhr.abort() , so it feels rather natural to reuse that XMLHttpRequest object (which I just called xhr here). I am trying to understand whether it is a good or bad idea to reuse the XMLHttpRequest object. What pros and cons can you see? PS: This rewrite will use native ES6-style Promise so it can only run in newer web browsers. 回答1: Just