Traditional cross-domain requests do not have a good solution, nothing more than Jsonp and IFRAME, with the application of cross-domain requests more and more, the Consortium provides a standard scheme for cross-domain requests (cross-origin Resource sharing). IE8, Firefox 3.5 and later versions, Chrome browser, Safari 4, etc. have implemented the Cross-origin Resource sharing specification, which enables cross-domain requests.
When the server responds to the client, bring the Access-control-allow-origin header information.
Ajax cross-domain issues:
Workaround:
response.setHeader("Access-Control-Allow-Origin""*");
Attention:
If access-control-allow-origin:* is set, scripts for all domain names are allowed to access the resource;
access-control-allow-origin:http://www.ql1d.com, allowing specific domain names to be accessed.
Ajax cross-domain settings Access-control-allow-origin