I work on a relatively simple e-commerce type website using HTML and JS, no React/frameworks. We occasionally receive complaints from customers (using the mobile Safari browser specifically) that after they scroll through our inventory, click on an item to read more about it at a different URL, then click the back button, they are taken back to the top of the inventory page instead of back to where they had previously scrolled to.
I don't experience this behavior myself -- it works just the way these customers want it to -- and from reading about the history.scrollRestoration
API and StackOverflow threads around it, it seems like this is "restore scroll on back button" supposed to be the standard, default behavior (example).
So why isn't it working as expected for some people? Is this really the default behavior of Safari and other browsers?
Different Safari on iPhone users experience different behavior after clicking the "back" button -- some have their previous scroll position restored, others are taken to the top of the page, why?