When JS + XMLHTTP accesses data from other websites across sites, it will face the problem of cross-origin access data. The core reason for this restriction is not the server, but the IE of the customer segment, which is restricted by security considerations. Therefore, this cross-origin access restriction can only be concentrated on breaking through the IE restriction, the stupid way is to directly set ieto allow cross-origin in the security settings of IE, so that the client segment script can be accessed across-origin, however, the biggest disadvantage of this method is that the customer needs to adjust it manually. Because the default setting of IE is disabled, this path is obviously unavailable. Therefore, we can only adopt other workarounds. First, cross-origin access is restricted by the client, that is, Internet Explorer. However, cross-origin access through server scripts is allowed on the server, in this way, we can use the server segment scripting technology in the local domain, that is, our own domain name. First, we can obtain data from another domain, and then the client will read the local intermediate interface, to achieve cross-origin access.
JS + XMLHTTP ------> Cross-origin interface (restricted by customer segments)
The alternative access is
JS + XMLHTTP -----> local region interface (ASP or PHP/JSP/Asp.net, etc.) ----- cross-origin interface note: that is to say, first obtain data from other domains through the server segment script technology locally, and then call this interface in the local region.