Hacker News new | ask | show | jobs
by sanchez_0_lam 755 days ago
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
1 comments

It's stored in your history stack. I spent 15 seconds pressing the back button slowly becoming more and more horrified as I watched my characters disappear one by one.

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.