4 ms·
> If I'm scrolling down a listing page, I don't want to open a new page because returning will often leave me not where I was before. Have you actually tried d
by yakshaving_jgt 4y ago
> If I'm scrolling down a listing page, I don't want to open a new page because returning will often leave me not where I was before.
Have you actually tried doing that on this very website you are now reading?
Click on my profile. Then click back. Where are you?
When I tested this just now, I was returned to exactly the point in the page where I left it.
- iggldiggl 4y agoIt works reliably for pages that don't do any client-side-rendering – in that case the browser reliably knows when it has finished loading and layouting all the content and can then restore the scroll position. Things become more iffy with client-side rendering, because the browser has no clear signal to decide when page-loading has progressed far enough that it can try to restore the previous scroll position.
- yakshaving_jgt 4y agoRight. So do less client-side rendering. The internet does way too much client-side rendering, for no reason whatsoever.
- Gigachad 4y agoThat's not going to happen. It's much easier to open a model or sidesheet than use server side rendering. I imagine in future generations of frameworks and browsers, we will be able to do SPAs without the issues we currently see.
- yakshaving_jgt 4y agoI really don’t think it is. You then need to account for: - all the extra styling complexity - the history API - memory management (sometimes) Etc.