News for hackers. Stuff that matters.
Re:Ask HN: Why is the back button becoming more and more use... by bryanrasmussen on Sunday July 10, 2022 @02:03AM (#32042251)
Because more and more things are being built as SPAs on frontend with JavaScript, because hammer nail dynamics just makes it easier to do that, and the back button is useful in a world where each page is a discrete HTTP request but now each page is the result of a dynamic JavaScript interpretation of state, and often people have not made any solution for showing the state represented by you hitting the back button which might be really difficult to do and also not help with any of the metrics business has assigned to show the site is functioning as it is supposed to.

In the case of Reddit, probably when you click interesting thing your current url is saved to history and then you go forward, you go back the url is used to construct page again, but that url probably represents a concept like "Currently most popular posts under subject X" not what lifeplusplus was just looking at with particular offset etc.

Re:Ask HN: Why is the back button becoming more and more use... by logicalmonster on Sunday July 10, 2022 @10:29PM (#32051507)
> Because more and more things are being built as SPAs on frontend with JavaScript

Regarding not making the back button do anything in certain cases, I think part of the problem is the shitty infinite-scroll, endless toilet-paper UX that many modern apps use for pagination. It makes a lot of UX choices awkward.

Say you're building some Instagram or Pinterest type of App and you just have some kind of endless scroll to view content continuously. The user scrolls for 10 minutes seeing 100 pages worth of content on one root URL, and then clicks on another page and then goes back. What then? Do you put them at the bottom of the 100 pages on the original page after they hit that back button?

It's not super difficult to save say the last item you scrolled to and go back there when you reload the page from a back button press, but that specific UX just makes it awkward to know where you even are within a specific page. Maybe if people get lost when going backwards and that's the UX choice, it's not even worth bothering.

Re:Ask HN: Why is the back button becoming more and more use... by wruza on Sunday July 10, 2022 @02:09PM (#32047232)
Browsers could adapt and provide a unique attribute which they could scroll to again after reconstruction. But that would be sacrilegious and illegal in some countries.
Re:Ask HN: Why is the back button becoming more and more use... by lifeplusplus on Sunday July 10, 2022 @02:23AM (#32042318)
isn't that bad UI? I see things, I click on one of them, so when I click "Go Back" I want to go back to where I started not to different dimension each time.
Re:Ask HN: Why is the back button becoming more and more use... by bryanrasmussen on Sunday July 10, 2022 @02:31AM (#32042353)
sure, it's bad UI and bad UX, but many bad UIs and bad UX exist because it would be prohibitively expensive to fix them, fixing them gives no benefit to the business that pays for them (have you stopped Reddit over this and gotten a message to them about it that they will understand?), or fixing them actually is actively against the interest of the business (when you use the back button on Reddit you get new showing of "most popular in this topic", their request count for "most popular in this topic" goes up, you are forced to scroll through bunch of stuff again increasing 'engagement' and everybody who makes decisions about how Reddit should work is happy)