> But that was too ugly for URLs, so modern websites now use browser history APIs just so they can remove 3 characters from the URL and do stuff like
Would back/forward buttons continue to work if we decided not use browser history APIs?
Would back/forward buttons continue to work if we decided not use browser history APIs?
So they invented the history API's so SPA's could stop breaking some of the user expectations they were breaking.
I could try with something like React, but that's too much for a quick test.
.replaceState() will replace current url without putting it in the history, so back won't work, while .pushState() does.