There are three ways to get around the Same-Origin Policy:
- Proxy — as Strawberry Sheurbert did, perfectly effective but a waste of bandwidth and computing power
- JSONP — loading the data through the
script
tag. Needs cooperation from source website and basically hackish and clumsy. - CORS — the “right” way, elegant and nuanced, but needs a lot of cooperation from source website and doesn’t work with older browsers.
You pays your money and you takes your chance.
solved Same Origin Policy, Javascript/jQuery AJAX and retrieving an RSS XML feed