7 ms·
I think that's just how pages are when you write them in plain-enough HTML and aren't overwriting the DOM with JS all the time. The web browser keeps track of y
by solardev 2y ago
I think that's just how pages are when you write them in plain-enough HTML and aren't overwriting the DOM with JS all the time. The web browser keeps track of your scroll progress and has the page in its cache (like frankjr said). You can disable JS altogether and it'll work the same.
It's a modern anomaly with JS frameworks that we've hacked and over-stretched the DOM so far past its original design that basic things like going forward/back need explicit JS handlers that rarely work all that well. You shouldn't need any state in JS to store basic navigation. It didn't used to be that way, and arguably shouldn't be that way for simple text-based sites like this. Maybe it's just becoming a lost art these days =/