PHP Advent 2011:带有CORS的跨域Ajax

Cross-Origin Ajax with CORS

I've had the honor of writing for this year's PHP Advent, blessing you all about Cross-Origin Requests with CORS:

我很荣幸为今年PHP Advent撰写文章,向大家祝福CORS的跨域请求:

There's no doubt that Ajax is one of the most exciting, useful, and necessary web technologies available to front-end developers. Unfortunately, it's also one of the most restrictive — especially when it comes to gathering content from other domains. Web developers are nothing if not persistent, so we've come up with a variety of ways to get around cross-origin restrictions, including JSONP, server-side proxies made with PHP, ProxyPass proxying, Flash transports, creative iFrame uses, and more. What many developers don't know is that there's a W3C specification called Cross-Origin Resource Sharing, or CORS, which provides a standard for cross-origin Ajax requests with minimal hassle.

毫无疑问,Ajax是前端开发人员可以使用的最令人兴奋,有用和必要的Web技术之一。 不幸的是,它也是最严格的限制之一-尤其是从其他域收集内容时。 Web开发人员即使不是持久的也不是什么,所以我们想出了各种方法来克服跨域限制,包括JSONP,用PHP制作的服务器端代理,ProxyPass代理,Flash传输,创造性的iFrame使用等等。 。 许多开发人员不知道的是,有一个称为跨域资源共享(CORS)的W3C规范,该规范为跨域Ajax请求提供了一个标准,并且麻烦最少。

That's my Christmas gift to you all!

那是我给大家的圣诞节礼物!

翻译自: https://davidwalsh.name/ajax-cors

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值