5. Comparing Origins
5. Comparing Origins
Two origins are "the same" if, and only if, they are identical. In particular:
-
If the two origins are scheme/host/port triples, the two origins are the same if, and only if, they have identical schemes, hosts, and ports.
-
An origin that is a globally unique identifier cannot be the same as an origin that is a scheme/host/port triple.
Two URIs are same-origin if their origins are the same.
NOTE: A URI is not necessarily same-origin with itself. For example, a data URI [RFC2397] is not same-origin with itself because data URIs do not use a server-based naming authority and therefore have globally unique identifiers as origins.