[EDIT] it probably became a pattern because of browsers that didnt implement the history API, so all hashchange events were pushed onto the history stack.
[EDIT] it probably became a pattern because of browsers that didnt implement the history API, so all hashchange events were pushed onto the history stack.
If you're launching a link from a page you expected to come back to, surely opening the link in a new tab would be the way to accomplish this?
For that reason, I think that pushState here would make more sense. The state of the page does, after all, change.
When the user is in a linear sequence such as a slide deck, photo gallery or similar, the "previous"/"next" buttons don't map to the browser's back/forward buttons, they navigate the sequence. Littering the history with the navigation history of this sequence does not make sense.
However, it'd be nice if browsers could perhaps record the history (perhaps as some kind of sub-tree history), allowing me to see that I not only visited this slide deck, but that I also visited these specific slides.
I don't think this is better personally. I prefer the use of pushState and back button taking me to the previous slide.
If I really want to back all the way out of the slide deck I will notice after a couple of clicks I need to do something further to go 'all the way back' and right click the back button and click a 'non-slide-deck' selection from that menu.
In this case it doesn't make sense as you remain in the "slide" view the entire time.
https://developer.mozilla.org/en-US/docs/Web/API/Location.re...
* myname.com/about.html
* myname.com/projects.html
Would you want to jump out of myname.com entirely when you press back? If not, how do you differentiate that from slides with myname.com/slide1, myname.com/slide2?