这与性能无关…
当需要在浏览器传递给其他代码之前完成该ajax请求时,请将async设置为false:
<script> // ... $.ajax(... async: false ...); // Hey browser! first complete this request, // then go for other pres $.ajax(...); // Executed after the completion of the previous async:false request.</script>



