<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <button>sssss</button> <script src="https://cdn.bootcss.com/jquery/1.12.0/jquery.js"></script> <script type="text/javascript"> var i=1; $("button").click(function(){ send(i); i++; }) var currentRequests = {}; $.ajaxPrefilter(function( options, originalOptions, jqXHR ) { if ( currentRequests[ options.url ] ) { jqXHR.abort(); } }); function send(da) { console.log(i) var url='urls.json' $.ajax({ url: url, type: 'GET', cache:false, dataType: 'json', beforeSend :function(){ currentRequests[url]=true; }, success:function(data){ currentRequests[url]=undefined; } }); } </script> </body> </html>