AJAX请求同步VS异步

编程入门 行业动态 更新时间:2024-10-10 01:26:47
本文介绍了AJAX请求同步VS异步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

有一个同步的请求,并与异步请求的性能之间有什么区别(速度明智)?

Is there any difference in performance ( speed wise ) between a synchronous request and and asynchronous request?

什么都是理由使用异步请求??

What all are the reasons for using an asynchronous request??

推荐答案

您应该多为始终使用异步AJAX请求,其实我知道,只有一个地方,一个同步的Ajax请求应使用的是如果你在一个Ajax请求嵌入在客户端上一个新的JavaScript文件,然后从JavaScript的从原来的Ajax请求返回引用的文件类型和/或对象。那么这个新的JS文件的抓取应该(或可以三立)通过使用同步的Ajax请求包括...

You should mostly always use an asynchronous Ajax Request, in fact I know only about one place where a synchronous Ajax Request should be used which is if you're in an Ajax Request embedding a new JavaScript file on the client and then referencing types and/or objects from that JavaScript file in the return from the original Ajax Request. Then the fetching of this new JS file should (or can sanely) be included through using a synchronous Ajax Request...

其他然后,你应该的总是的使用异步Ajax请求。最重要的原因是同步的Ajax请求,使用户界面(浏览器)无响应...

Other then that you should always use asynchronous Ajax Requests. The most important reason is that a synchronous Ajax Request makes the UI (browser) unresponsive...

更多推荐

AJAX请求同步VS异步

本文发布于:2023-10-10 22:01:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1479880.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:AJAX

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!