简体   繁体   English

Ajax-跨域请求是否返回请求标头?

[英]Does Ajax - cross domain request return the request header?

I know that the ajax-cross domain call will not return the data from server. 我知道跨Ajax跨域调用不会从服务器返回数据。

however, does it return a http header, like 200, 404..etc? 但是,它是否返回http标头,例如200、404..etc?

It doesn't actually fire the request. 它实际上不会触发请求。 If it did, CSRF would be almost impossible to stop... 如果这样做的话,CSRF几乎是不可能停止的...

You can read more about it here and here 您可以在这里这里阅读更多信息

But, if you want to fetch content from a different source, check out JSONP 但是,如果您想从其他来源获取内容,请查看JSONP

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM