Bug report
Describe the bug
Entries added to history.state are not preserved after navigating away and back to the page.
To Reproduce
- On any page, enter
history.replaceState({ ...history.state, hello: 'world' }, location.href) in the console
- Click on a link that navigates away from the page
- Click "back" in the browser
- See that
console.log(history.state) does not include {hello: 'world'}
Expected behavior
{hello: 'world'} to be a part of the state.
System information
- OS: Ubuntu 18.04
- Browser: Chrome, Firefox
- Version of Next.js: 8.1.0