Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当对服务器的 HTTP 请求需要很长时间才能完成时,服务器可以发送部分响应,浏览器通常会显示这些部分,即使响应尚未完成。
现在,如果我使用jQuery.ajax而不是普通的浏览器请求,我是否有办法在完成之前获取响应数据的第一部分?
jQuery.ajax
您可能只需要添加:
async: false,
您要求强制ajax 请求在继续之前等待响应?