I’ve searched for answers to this enough to note that this is more complicated than I’d have thought. But I do notice that social media pages on “facebook” can get quite long, and yet will maintain the position you are “at” when you change the viewing orientation on a smartphone browser. Pages I’m trying to develop definitely do NOT. Some mobile devices seem to take care of this for you, but is there a “canned” drop in universal fix for this?
I’d thought maybe I could write code to be triggered by an “onscroll” event, somehow saving the current page position (maybe to a cookie?), and then maybe restore to that position when the window.onorientationchange event fires. BUT, I don’t even know if that can be done, and I know scroll “bars” don’t even show up on smartphone pages. So is there even an “onscroll” even in that case? Ideas?