HACKER Q&A
📣 lifeplusplus

Why is the back button becoming more and more useless?


I have noticed that more than usual now If I click back button I never get the same page again. Neither the content or scroll position is preserved. This is true on reddit, youtube, facebook, linkedin, and other sites. Each time just loading icon appears and then proceeded by completely random stuff. I.e. I'm scroll on reddit, I see few interesting things, I click one, it wasn't as good as I thought but the other thing I read was looking good, I go back, it's nowhere now.


  👤 bryanrasmussen Accepted Answer ✓
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.


👤 cookiengineer
Because the people building those websites are not using the History API to push website state changes correctly. [1]

You could easily use unique encodings of URLs to restore the deep state of the website's content. Even when you would use e.g. only the #hash like the old twitter app did.

[1] https://developer.mozilla.org/en-US/docs/Web/API/History


👤 Trouble_007
Three emotions to manipulate; Fear of missing-out, Time-spent Anxiety, and Anger.

The evil marketing side of me says, bring up a dialog-box;

  "your time is important to us,

  would you like to view a 15-sec sponsor-commercial and return to your-position on the previous page Yes/No"

  'Yes' runs the Spot and returns to the exact position on the previous page.

  'No' either just removes the dialog-box, and/or takes you to the top of the current-page,

  or takes you to a random-page very loosely related to the subject of the previous page.

P.S. Please don't Kill ME!

👤 kioshix
Because of this, I've gotten into the habit of opening almost everything in a new tab. I browse the front page of HN/reddit in one tab, open comment pages in a new tab, and look at the submission itself in a new tab. In a way, I've mostly replaced the back button with the close tab-button on a lot of sites.

I know HN doesn't have this problem, but I still do it out of habit, and I then open multiple submissions of interes and go through them.


👤 codingdave
Many devs don't bother to preserve back button functionality. There is a History API that helps, as does appropriate routing/linking in your app. But we are admittedly missing a strong culture of "Don't break the back button" in our industry.

👤 subtra3t
Because pretty much everything nowadays is a bloated SPA with Javascript unnecessarily sprinkled on top to add "interactivity". The back button worked well when everything was a static page, but unfortunately now every site just has to make their own complicated twist on top of it to seem unique.

👤 politelemon
Not a direct answer, but I find that long pressing the back button is helpful in those situations, a dropdown appears and it shows all the previous pages I had visited, even if the history has been polluted.

👤 peanut_worm
Lazy devs who dont want to learn the history api and malicious devs who want to trap you on a website