这个跨域 ajax 请求是如何工作的?
本文介绍了这个跨域 ajax 请求是如何工作的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在查看 这个问题其中有一个指向 http://hacks 的链接.mozilla.org/2011/03/the-shortest-image-uploader-ever/ 有以下代码:
I'm looking at this question and in it is a link to http://hacks.mozilla.org/2011/03/the-shortest-image-uploader-ever/ which has the following code:
这个跨域请求是如何工作的?我认为通常会有一些安全限制阻止人们这样做.
How does this cross domain request work? I thought as a rule there are security restrictions that stop people from doing just this.
推荐答案
服务器正在响应 Access-Control-Allow-Origin 设置以允许跨域请求
The server is reponding with the Access-Control-Allow-Origin set to allow cross domain requests
http://www.w3.org/TR/cors/#access-control-allow-origin-response-hea
http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors
这篇关于这个跨域 ajax 请求是如何工作的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!