Rails rails 项目 ajax 跨域请求

uudui · May 18, 2012 · Last by camel replied at May 19, 2012 · 5872 hits

估计大家在做项目的过程中也遇到过,很多 ajax 请求需要用到第三方的一些数据,那么就需要进行跨域操作。 我目前所用过 jsonp 和 gem rack-cors(https://github.com/cyu/rack-cors)去做过

不知道大家在项目中采取的何种策略,是否愿意分享一下在做这方面的经验一起探讨探讨。

当然只能 jsonp 了

也可以代理给自己的服务端,加上 timeout 和 default value 可以让用户体验更好。

要知道毕竟是在中国

jsonp +1

uudui closed this topic. 10 Oct 20:03
You need to Sign in before reply, if you don't have an account, please Sign up first.