3

So, this happened some time ago (probably over a year or so). Before that, the pages used to scroll to the top when reloaded. Then, this change was made. Now, whenever a page is reloaded, the position of the scrollbar is maintained (this happens on all pages across the network, AFAICT).

This has bothered me ever since and I couldn't find any post discussing it. So, let me ask:

  • Was there ever an explanation of why this "feature" was added?

  • How many users find this useful compared to the old behavior?

The reason it bothers me is that if I'm on the home page (or the questions page), for example, and I reload the page, 99.99% of the time, it's because I want to see the new questions. Right now, I have to reload the page and then scroll to the top (press Home) every single time.

Maybe this is useful when one is viewing a post (although I doubt it) so perhaps it can be applied on certain pages only? What do you think?

I'm using Chrome on Windows but I got a similar behavior on Firefox as well.

11
  • 3
    I wonder if this is a feature from the browsers. I tested a handful of other websites from my bookmarks and it seems like most of them keep their scroll position when reloaded. Jun 17, 2020 at 0:07
  • 1
    @KodosJohnson It could be. It doesn't happen with all websites though so the website creators certainly have control over this. I was able to see a small difference between Chrome and Firefox though. On chrome, the position will be maintained whether you reload (F5) or "re-go" (i.e., activate the address bar and press Enter). On Firefox, however, the position appears to only be maintained only if you reload. Jun 17, 2020 at 0:10
  • 4
    This is a feature of most browsers that has existed for some time. It is not a feature of our sites.
    – animuson StaffMod
    Jun 17, 2020 at 0:10
  • Scroll position is almost always determined by browsers, not by site code. (Any exception I can think of has nothing to do with Stack Exchange.) And, personally, I would be incredibly annoyed if my scroll position were not maintained on reload. I believe the current browser behaviour is correct. But, that aside, it's not under the control of the site. Jun 17, 2020 at 0:11
  • Um, can someone explain why this isn't the case on all websites then? Jun 17, 2020 at 0:13
  • In my test only one of them scrolled to the top. Perhaps they have custom logic to scroll to the top on load. I also just verified by making a html document with a bunch of <div>test</div> elements copied several times. I opened it in chrome and it kept the scroll position on reload. Jun 17, 2020 at 0:15
  • See Force page scroll to top at at page reload in HTML—and the answers all use javascript, not HTML. You have to work to override the browser default behaviour. Jun 17, 2020 at 0:18
  • I just noticed that on the website that did scroll to the top, it was because the page content was loaded by javascript. So at first the page was blank so that's why it scrolled to the top on load. Then the javascript fills the content after the scroll behavior. Jun 17, 2020 at 0:19
  • @KodosJohnson You are right. This appears to be a browser's feature indeed. However, most websites that display a list of posts disable this behavior (take Twitter, and Reddit, for example). Do you think maintaining the scroll position on the home page is useful? Jun 17, 2020 at 0:19
  • 1
    See my comment just before yours. I think it's because those websites are javascript heavy. For example facebook only loads posts as you scroll down. So when it loads it naturally goes to the top. Jun 17, 2020 at 0:21
  • Hmm, I see. Well, looks like I'm the only one who is a little irritated by this behavior. Good to know anyway. Thank you all :) Jun 17, 2020 at 0:22

0

You must log in to answer this question.

Browse other questions tagged .