← Back to release summary

Introducing the Origin API

Category
Security
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

WPT details: https://wpt.fyi/results/html/browsers/origin/?label=master&label=experimental&aligned

Summary

The [origin](https://datatracker.ietf.org/doc/rfc6454/) is a fundamental component of the web’s implementation, essential to both the security and privacy boundaries which user agents maintain. The concept is well-defined between HTML and URL, along with widely-used adjacent concepts like _site_. Origins, however, are not directly exposed to web developers. Though there are various origin getters on various objects, each of those returns the ASCII serialization of an origin, not the origin itself. This has a few negative implications. Practically, developers attempting to do same-origin or same-site comparisons when handling serialized origins often get things wrong in ways that lead to vulnerabilities. Philosophically, it seems like a missing security primitive that developers struggle to polyfill accurately. As early as Chrome 145, we plan to address this gap in the platform by introducing an Origin object that encapsulates the origin concept, and provides helpful methods for comparison, serialization, parsing, and so on.

Standards & signals

Ecosystem

Explainers: https://github.com/mikewest/origin-api

View on chromestatus.com