title: How to cancel all other ajax requests?
body: <p>I have a SPA website.</p>
  <p>When I send request A, I find I clicked wrong link. So I click and send request B before complete request A. So I want to abort request A and all other requests. I tried <code>XMLHttpRequest.abort();</code> but it is only abort request B.</p>
  <p>Simple Source Code :</p>
  <pre><code>function link(){
  const request=new XMLHttpRequest();
  request.open('GET','//example.com/',true);
  request.send();
  request.onload=()=&gt;{
  console.log('Loaded');
  }
  }
  </code></pre>
  <p>Full Source Code :</p>
  <pre class="lang-xml prettyprint-override"><code>link(to){
      const requeset=new XMLHttpRequest();
      request.open('GET','/api/window.location,true);
      request.send();
      request.onload=function(){
      console.log('hello!');
      }
  }
  </code></pre>