3 ms·
Small request. If you are a developer and you are forced to implement infinite scroll and you can't quit your job, at least make sure the back button works.
by amelius 5y ago
Small request. If you are a developer and you are forced to implement infinite scroll and you can't quit your job, at least make sure the back button works.
- sovok_x 5y agoAnd a few more possibly good tweaks, it could also: - be pausable, allowing to reach the page's footer - be resumable from the latest viewing point on page reload - modify current URL periodically - preload new data slightly before reaching the end of last page - auto-pause at some point to prevent mental overload - be switchable, in part to "Click to continue" state, in options
- Aeolun 5y agoMaking all these things is too much effort, can I just use a good old paginated view instead?
- sovok_x 5y agoWhy not both with an options switch? Everything has its uses.
- nickjj 5y ago> - modify current URL periodically This is a big one. Without this it's so frustrating to infinite scroll down to the equivalent of 12 pages, leave the page and want to go back to roughly where page 12 is another time. Instead you have to start from the top and scroll down. You'd likely save a good amount of server compute power just using push state to update the page in the URL as you go so folks can copy / paste it and jump right back to that page later.
- Aeolun 5y agoWhat does ‘back button works’ mean in the context of infinite scroll?
- slig 5y agoClicking the back button after navigating away from the infinite scroll madness should return to the same spot in the infinite scroll list.
- Thorrez 5y agoThat's kind of tricky. I assume the list is allgorithmically generated. So simply having the back button go back to the list, and down to item 50, might give you a list that looks completely different. Even HN might have this problem a bit. If you visit the homepage you click an article, spend some time reading it, then click back, the homepage might have changed, and even post you were reading might not even be on the homepage anymore. HN is much less bad than infinite scroll sites, because HN's homepage is the same for everyone, and doesn't change nearly as often. One way to to solve this might be to store a session ID as a query parameter that gets automatically added when you visit the homepage, and store the complete state of each session either serverside or locally in the browser. Then when you navigate back to that session ID, you get the same page. There are a number of downsides to this though. The session ID in the URL is ugly, there's a lot of storage needed for all these session, sessions likely need to be pruned at some point (so the back button will stop working at some point), and it's very difficult to figure out what to do when multiple tabs open the same session ID.
- elefanten 5y agoWhere would they be “forced” to implement infinite scroll and also have the latitude to design/PM the product features? I doubt any product of consequence would allow this to happen. Doing your job as a rogue quasi-saboteur probably isn’t a better option than quitting.