6 ms·
It 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
by iggldiggl 4y ago
It 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.