coderef

OriginLimited availability

An Origin object represents an origin, as in a scheme, hostname, and port. You can use it to make same-site and same-origin comparisons.

Not yet supported in all major browsers — check the table and provide a fallback.

Browser support

DesktopChrome
1–144Not supported
145+Supportedsince Feb 10, 2026
Current: 155
Edge
12–144Not supported
145+Supportedsince Feb 14, 2026
Current: 154
Firefox
✕Not supportedup to 157
Current: 157
Safari
1–26.4Not supported
26.5+Supportedsince May 11, 2026
Current: 27
MobileChrome Android
18–144Not supported
145+Supportedsince Feb 10, 2026
Current: 155
Firefox Android
✕Not supportedup to 157
Current: 157
Safari iOS
1–26.4Not supported
26.5+Supportedsince May 11, 2026
Current: 27

How to use

Not supported in Firefox, Firefox Android. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN — see the links below.

Feature detection

JS · check before using
if ("Origin" in globalThis) {
  // Origin is available
} else {
  // load a polyfill or use a fallback
}

Sub-features

Support for each part of the feature (6). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
Origin145145✕26.5145✕26.5
Origin.Origin145145✕26.5145✕26.5
Origin.from_static145145✕26.5145✕26.5
Origin.isSameOrigin145145✕26.5145✕26.5
Origin.isSameSite145145✕26.5145✕26.5
Origin.opaque145145✕26.5145✕26.5