💾 Archived View for bbs.geminispace.org › s › Lagrange › 16561 captured on 2024-05-10 at 11:21:55. Gemini links have been rewritten to link to archived content

View Raw

More Information

➡️ Next capture (2024-05-12)

-=-=-=-=-=-=-

Lagrange losing some old history entries?

I am under the impression that Lagrane loses some history entries after a while.

It feels some URLs are marked as unvisited, even though I'm pretty sure I visited them, because in some places I always visit all the URLs.

I am not a hundred percent certain, because a link to `example.com/` is not considered the same as `example.com/index.gmi` by Lagrange.

If I encounter a non-visited link Im certain I've already visited, it's on another page linking to this URL.

Edit: Now I'm sure that some history entries are gone, because the link to the Gemini subscription companion spec was displayed as unvisited, even though I've been there many times.

Posted in: s/Lagrange

🍵 michaelnordmeyer

May 03 · 7 days ago

1 Comment

🕹️ skyjake [mod...] · May 04 at 07:43:

You are correct. Lagrange has a hardcoded limit for browsing history entries. URLs older than six months are discarded from the list of visited links.

This is done to avoid the complexity of having to keep a potentially ever-increasing list of URLs in memory and also have it be persistently and efficiently saved at all times, without delay. Doing this properly calls for something like a database, but that would be a significant extra dependency that I've chosen not to add.

There are a few things I could do with the current implementation to make it smarter, but it comes with the usual cost of added complexity. For instance, when browsing, visited URLs could be appended to the visited file (that is just a plain text file), a single line at the end. Sorting the list for keeping in memory (for efficient lookups) would then have to occur when loading the file at launch. It would still need some maximum RAM limit to avoid eventually growing too large.

a link to `example.com/` is not considered the same as `example.com/index.gmi` by Lagrange.

This particular pair of URLs should not be considered equivalent by anyone, because "index.gmi" is only a best practice, not required by the specification.

`gemini://example.com` and `gemini://example.com/`, on the other hand, should be considered the same. I should check if that's the case in the visited URLs list currently.