indiewebring.ws
indiewebring.ws copied to clipboard
The next & previous links just link to a random site on the ring
Is this expected behaviour? I tested it with some random sites aswell as mine, I clicked next, and then previous, and almost never went back to the original site.
Also, maybe the ring should have a separate "see a random page" button?
Thanks, @zaguragit ! It's true that this is not a true "ring". You can see in the code here that /next
and /previous
just pick a random site in the ring.
I'm open to making it work more like a ring but I also want to keep it simple and efficient. I'm open to ideas for implementing that!
A "see a random page" button could make sense. If you want to pursue that further, please open a separate issue for discussion. (For now folks can feel free to open the directory and choose a site at random. :smile: )
When it comes to the implementation, when clicking on the previous/next buttons, the server is already aware of the index of the current website, so it would just look up the neighbouring indexes, right? Or it could pre-compute all of the urls every time a new website gets added, which happens far less often than link clicks, so it might be more efficient