Concepts

Opaque origin serialization

Try the free JavaScript compiler

A URL whose origin serializes to null is not an authenticated identity; distinct opaque origins can have the same serialization.

Formal Syntax & Structure

javascript syntaxjavascript
new URL(dataURL).origin

Working Example

Example Snippetjavascript
(async () => {console.log(new URL("data:text/plain,A").origin,new URL("data:text/plain,B").origin);})()
JavaScript Reference