开发者

Limitations on client-side 3rd party querying? (JavaScript/AJAX)

开发者 https://www.devze.com 2023-02-06 02:13 出处:网络
What are the limitations on having a client query 3rd party URLs (ones wit开发者_如何学Ch different domains than my site)?

What are the limitations on having a client query 3rd party URLs (ones wit开发者_如何学Ch different domains than my site)?

Would I be able to make their browser query another site "behind the scenes" and send the response to me?

Would I be able to make them store a cookie from that site?

The reason I want to do this all is because I want to basically use another site as an API, even though they haven't written one. In case you're wondering I do have permission to fetch from this site.

The reason I wanted to do it client-side is for speed reasons.. If my server doesn't have to do all the queries then things will go faster for my users..


You're not allowed to make XHRs to other domains.

Two options:

  • Use a script tag, or JSONP http://en.wikipedia.org/wiki/JSON (they must support it)
  • Create a proxy to the other server through your own server.
0

精彩评论

暂无评论...
验证码 换一张
取 消