foreseen

A text-based gemini browser with prefetching
git clone git://git.laack.co/foreseen.git
Log | Files | Refs | README | LICENSE

commit ac81bb467ca4b4e1146d0a45813276328d3ddf71
parent 3c020c42130ee3517068bd298a761b99fc6747ce
Author: Andrew Laack <andrew@laack.co>
Date:   Tue, 29 Sep 2026 11:00:49 -0500

Updated folding in readme

Diffstat:
MREADME | 38++++++++++++++++++++++++--------------
MTODO.txt | 5+++++
2 files changed, 29 insertions(+), 14 deletions(-)

diff --git a/README b/README @@ -50,27 +50,37 @@ Example: (I recommend symlinking ~/.foreseen to somewhere you backup regularly) Example command to generate keys: - openssl req -x509 -newkey rsa:2048 -nodes -days 3650 -keyout client.key -out client.crt -subj "/CN=localhost" + openssl req -x509 -newkey rsa:2048 -nodes -days 3650 -keyout client.key \ + -out client.crt -subj "/CN=localhost" Caching ======= -All caching is done in memory with a configurable fifo data structure to limit cached page count. -There are two seperate instances of the cache object at any given time. One for prefetching and one for history. -Pages fetched with an identity are never cached, and prefetching never sends requests to hosts you'd use an identity for. +All caching is done in memory with a configurable fifo data structure to limit +cached page count. There are two seperate instances of the cache object at any +given time. One for prefetching and one for history. + +Pages fetched with an identity are never cached, and prefetching never sends +requests to hosts you'd use an identity for. Prefetch caching: - One of the main reasons this browser feels so much faster than other gemini protocol browsers is because of its optional prefetch caching. - This is enabled by default. When you visit a site without an identity, a thread will be created that fetches the first 10 links on the page. - This enables ~ instantaneous visitation of those links. Prefetch caching is only enabled when you aren't using an identity for a domain. - Per the gemtext specification, "clients must not automatically make any network connections as part of displaying links", so this mode of - operation may be construed as non-compliant with the gemtext specification. I don't believe a file format specification should be prescriptive - about such things. Additionally, if this was a feature in a http-based web browser, I would disable it. I perceive Gemini as being more - trustworthy right now and thus am not concerned about having this defaulted on. + One of the main reasons this browser feels so much faster than other gemini + protocol browsers is because of its optional prefetch caching. This is + enabled by default. When you visit a site without an identity, a thread will + be created that fetches the first 10 links on the page. This enables ~ + instantaneous visitation of those links. Prefetch caching is only enabled + when you aren't using an identity for a domain. Per the gemtext + specification, "clients must not automatically make any network connections + as part of displaying links", so this mode of operation may be construed as + non-compliant with the gemtext specification. I don't believe a file format + specification should be prescriptive about such things. Additionally, if + this was a feature in a http-based web browser, I would disable it. I + perceive Gemini as being more trustworthy right now and thus am not + concerned about having this defaulted on. History caching: When you visit a page, the page will be cached after it's loaded. - If the page was in the prefetch cache before, it will be upgraded to the history cache. - This is because visited pages are more important than prefetched ones. - History caching is disabled when using an identity. + If the page was in the prefetch cache before, it will be upgraded to the + history cache. This is because visited pages are more important than + prefetched ones. History caching is disabled when using an identity. diff --git a/TODO.txt b/TODO.txt @@ -112,6 +112,9 @@ - i'd expect that to be searched. - gemini://9e4.com - that site just seems to ... hang? for like a long time, too long. + - back button seems to still sometimes go back to the same page I was on before + - page_0 -> page_1 -> redirect -> page_1 + - back should go to page_0 - TESTING CHANGES: - add more asserts in my code so edges can be pushed @@ -119,3 +122,5 @@ --- - proper argparse +- man pages +- refactor tests to use built in catch2 generators + sections