Web origin

وب 2 views

What is an origin on the web?

An origin identifies a web location by its scheme, hostname and port.

What does the browser compare?

The browser compares the scheme, hostname and port to determine whether two URLs share an origin. The path and query string are not part of that comparison.

Two pages with different paths

https://example.com/docs and https://example.com/blog share an origin. Changing the host to api.example.com creates a different origin.

Do all subdomains share an origin?

A shared parent domain is insufficient. A dashboard and an API can be operated by the same organization while the browser treats their origins separately.

Persian equivalent مبدأ در وب

Reference