A part of a URL that probably contains: Scheme://host:port/path? #hash
For example, a URL of http://www.xxx.com:8888/school/student.html,
So HTTP is scheme,www.xxx.com or host,8888 is port,
What is homologous?
If the "scheme://host:port" content of the two URLs is the same, it is called homology.
What is cross-origin access?
If the scheme, host, and Port of the two URLs are not the same, they are different sources.
At this point, a URL script fetches data from another URL and is called cross-origin access.
For the Inter-hospital visit, the Web proposed a scheme called CORS (cross-origin Resource sharing), however, only modern browsers support this scenario.
How CORS works:
1) When a script from the current page in the browser requests data from another server, the browser appends an Origin header to the data header that originated the connection,
Indicates the source of the current page and then initiates a connection to another server
2) After the target server receives a connection request from the browser, if the request is accepted, add a in the header of the response data stream
The Access-control-allow-origin header, and assigns a value to the header, which is the value of the Origin header sent by the browser.
or "*" (indicates that this server is running any cross-site requests). If the request is not accepted, the Access-control-allow-origin header is not included.
3) The browser accepts packets that are returned to parse and drops the response packet if it does not contain the Access-control-allow-origin header.
About CORS, there is a foreigner Daniel (Nicholas C zakas) blog, you can see:
https://www.nczonline.net/blog/2010/05/25/cross-domain-ajax-with-cross-origin-resource-sharing/
for web front-end developers, there is no need to do anything, directly in Ajax to initiate cross-domain access is just a browser to do something, and then the server to support.
Ajax cross-origin requests