A request is a same-origin request if:
are the same.
A request that is not a same-origin request is called a cross origin request.
Two HTTP requests have not the same origin if the URIs have:
than the actual loaded page.
In other words, Two HTTP requests have not the same origin when the URIs have the:
Example: All of the following resources have the same origin
User agents (such as browser) commonly apply same-origin restrictions to network requests. See Same-Origin Policy.
Two origins are said to be the same origin if the algorithm returns true.