"Simple?" Not really. Given your requirements, especially "without the server side", this is not possible.
However, if you can refuse this requirement, you have several options for including cross-domain requests.
CORS
decent support for Cross-resource sharing for XMLHttpRequest and Microsoft XDomainRequest . Although this will require that the remote server has the correct headers in the response so that your source / domain can make a request.
<% Response.AddHeader("Access-Control-Allow-Origin", "*") %>
Jsonp
A common option is JSONP , which loads the resource into <script> with the callback parameter with the name of the global function. Since JSON is based on JavaScript literals, this will not have the same problem with browser support, but the remote server will need to know how to build the output, and it is limited to GET requests.
// <script src="http://other.dom/resource?callback=loadResource"></script> loadResource( [ {"id": 1, "name": "foo"}, {"id": 2, "name": "bar"} ] );
Server side proxy
If the remote server you are requesting for cannot (or will not) configure to support cross-domain requests, you will largely have to make a proxy server on the server side.
The general outline is described at AjaxPatters.org , and a number of .NET implementations can be found, including John Chapman's and the Cross-Domain Proxy Project .
Jonathan lonowski
source share