The following code works if the server and client are on the same domain. $.get("",function(data){ $("body").append(data); }); but doesn't work in cross domain settings. For cross domains, you have to use JSONP. The server side has to be modified accordingly.