I have read that HTTP is a synchronous protocol. Client sends a request and wait for a response. Client has wait for the first response before sending the next request. Ajax uses HTTP protocol but is asynchronous in contrast. I also read that
Asynchronous request blocks the client until operation complete from here. I am confused and my quesetion are:
1. what is definition of synchronous when talking about HTTP Protocol?
2. Does synchronous associated with blocking?
HTTP同步性质
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- weixin_33743248 2018-09-10 07:31关注
Asynchronous means, you do an HTTP request, but you are not waiting until the answer arrives. You will handle it, when it arrives and are free to do other stuff in between. Meaning: You are not blocking your application from doing anything else.
Synchronous on the other Hand means, you do a request and wait for the answer before you do anything else. Meaning: You are blocking your application from doing anything else.
解决 无用评论 打赏 举报