Riff / Built on the open web / Platform
History
Back closes Now Playing, and the Listen app navigates without a page load.

How Riff uses it
Opening Now Playing pushes a history entry without changing the address, so Back closes the dialog. Closing it any other way pops that entry. The Listen app pushes an entry with the new address for each view it swaps in and re-renders on popstate, spreading the existing state so the Interactivity API's session id survives.
Why
A lost session id would make the Interactivity runtime reload the page on Back and end the music.
Where
- plugins/riff/assets/riff.js, line 1058
history.pushState( { ...history.state, riff: 'open' }, '' ); - plugins/riff/assets/riff.js, line 1099
window.addEventListener( 'popstate', () => { - plugins/riff/features/listen/app.js, line 113
{ ...history.state, riffApp: id },
Links open the source at the commit this page was published from.
Reference: History on MDN.