Any thoughts how this works under the hood? Like @gurjeet said, every keystroke is a new url. But then how all this is stored? Will it scale? :D
You can see how it works for yourself by opening your browser devtools, opening the JS console, and typing
window.location.hash = "test"
You should see a "#test" pop up at the end of your URL. Pressing back will not change the page, but will make that go away.