Closed
Description
- https://redirect-session-history.glitch.me/.
- Press "random pushState".
- Press "Set cookie: Serve pages with Content-Security-Policy: sandbox allow-scripts".
- Reload page.
- Look at "History state:"
The history.state
value is persisted in Firefox, Chrome and Safari. This seems not-great since data has crossed an origin boundary.
I'm going to spec it so history.state
is cleared on reload if:
- There's a redirect in the navigation (see Should navigating to the current URL preserve history.state? #6213 (comment))
- The new document's origin is different to the previous document's origin (although we'll probably do something different for error documents History entry state (history & appHistory) and error documents #7106)
cc @domenic as you'll want to avoid the same issues in app history 😄