Open
Description
In #6798 I preferred the Firefox model where a javascript:
navigation creates a history entry with a new document state (rather than Chrome's model where it updates the existing document state).
However, it creates an interesting situation:
- Navigate to
data:text/html;charset=utf-8,%3Cp%3Ehello%3C%2Fp%3E
location.href = 'javascript:"hello"'
In the Firefox model, this would create two history entries that have different documents, but exist in the same opaque origin. However, Firefox disallows this kind of navigation.
Opaque origins aren't serialisable, so there's no guarantee that the two entries will remain same origin to each other after things like a browser restart.
Options:
- Disallow this kind of navigation (like Firefox currently does).
- Create a new opaque origin in step 2 above (although a synchronous origin switch seems bad).
- Allow opaque origins to be serialised in some way.
This came up in WICG/navigation-api#167