Parse a request URL and determine whether it is same-origin as the current document base URL.
Note: The base URL is usually the same as the document location (location.href) but can be overriden by using the <base> tag.
location.href
<base>
The url of the request as a string that will be resolved or a parsed URL object.
Whether the URL is same-origin as the document base URL.
Parse a request URL and determine whether it is same-origin as the current document base URL.
Note: The base URL is usually the same as the document location (
location.href
) but can be overriden by using the<base>
tag.