Overcoming Cross-Domain issues
Are there any ways to overcome the cross domain issues that occur when attempting to retrieve data client-side from another web server in开发者_开发技巧 violation of the Same Origin policy?
http://en.wikipedia.org/wiki/JSONP
http://api.jquery.com/jQuery.getJSON/#jsonp
Instead of referencing a third party domain directly from the client, call up to your hosting domain and have the server retrieve whatever you're getting from the third party domain.
I concur with Greg D, it is easy enough to make an AJAX call to a script on your domain that uses curl to fetch a resource from another domain. Just remember that you will most likely want to cache the fetched file on your server so you don't have to go get it every single time a page is viewed.
精彩评论