异步和同步 HTTP 请求有什么区别? [英] What is the difference between asynchronous and synchronous HTTP request?

查看:38
本文介绍了异步和同步 HTTP 请求有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

异步同步 HTTP 请求有什么区别?

What is the difference between asynchronous and synchronous HTTP request?

推荐答案

同步:同步请求会阻塞客户端,直到操作完成.在这种情况下,浏览器的javascript引擎被阻止.

Synchronous: A synchronous request blocks the client until operation completes. In such case, javascript engine of the browser is blocked.

异步异步请求不会阻塞客户端,即浏览器是响应式的.此时,用户还可以执行其他操作.在这种情况下,浏览器的 javascript 引擎不会被阻止.

Asynchronous An asynchronous request doesn’t block the client i.e. browser is responsive. At that time, user can perform another operations also. In such case, javascript engine of the browser is not blocked.

这篇关于异步和同步 HTTP 请求有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆