javascript Ajax 是客户端脚本还是服务器端脚本?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5744368/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is Ajax considered client or server-side scripting?
提问by rita
Is Ajax considered as client or server side scripting?
Ajax 是客户端脚本还是服务器端脚本?
回答by TartanLlama
The technology which co-ordinates the AJAX approach (i.e. javascript) is client-side, although server-side scripts/servlets are needed to give the response.
协调 AJAX 方法(即 javascript)的技术是客户端,尽管需要服务器端脚本/servlet 来提供响应。
回答by Ortiga
Client. It runs on the browser only, and make requests to a server, just like the requests browsers do for any web page
客户。它仅在浏览器上运行,并向服务器发出请求,就像浏览器对任何网页所做的请求一样
回答by Kris van der Mast
Client side scripting.
客户端脚本。
However, Microsoft has also released server controls which ajaxify their ASP.NET pages, like the updatepanel control. Those are server side. Note that this is a specific implementation.
但是,Microsoft 还发布了服务器控件,它们可以对 ASP.NET 页面进行 ajaxify,例如 updatepanel 控件。那些是服务器端。请注意,这是一个特定的实现。
回答by Roger
Ajax is client side, but it will (almost always) access a server that is providing the data.
Ajax 是客户端,但它会(几乎总是)访问提供数据的服务器。
Sometimes the server scripts will have no specific support for Ajax as they are just returning XML style data, but in other cases the server may have specific support written in - for example in the popular case of JSONP.
有时服务器脚本没有对 Ajax 的特定支持,因为它们只是返回 XML 样式的数据,但在其他情况下,服务器可能有特定的支持——例如在流行的JSONP情况下。
[EDITED ANSWER]
[编辑答案]