Cross Domain Resource Sharing

There are lots of ways to do cross domain resource sharing.  Here are the 2 most popular.

JSONP
http://en.wikipedia.org/wiki/JSONP
  • Requires the server to "wrap" the json in a function call.


CORS
https://developer.mozilla.org/en/http_access_control
  • Better security
  • More modern
  • Requires an Access-Control-Allow-Origin string in the response header from the server.

Proxy / Server Wrapper
  • If you want to set up a proxy, go ahead
  • Or you can create your own REST service which in turn calls the resource you want.

Comments

Popular Posts