foreseen

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

commit 0b3a087c89ce2f0f63bac183ef203ff484e6408a
parent dd8fdf2286289b8886ad3761415b94b2cd1ac62f
Author: Andrew Laack <andrew@laack.co>
Date:   Sun,  4 Oct 2026 00:21:29 -0500

Revert "history  caching  for cert sites; this was bugging me"

This reverts commit dd8fdf2286289b8886ad3761415b94b2cd1ac62f.

Diffstat:
MREADME | 2+-
Msrc/browser.cpp | 6++++--
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/README b/README @@ -70,7 +70,7 @@ requests to hosts you'd use an identity for. 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. + prefetched ones. History caching is disabled when using an identity. Identities ========== diff --git a/src/browser.cpp b/src/browser.cpp @@ -137,7 +137,9 @@ bool Browser::goToSite(std::string url, bool addToHistory, bool refresh) { Identity id = identityManager.getIdentityForURI(destination->getLinkDestination()); if(urlString.find("gemini://") != std::string::npos && !refresh) { - site = findInCacheAndPromoteIfRelevant(urlString); + if(id.crtPath == "" && id.keyPath == "") { + site = findInCacheAndPromoteIfRelevant(urlString); + } } if(site == nullptr) { @@ -175,7 +177,7 @@ bool Browser::goToSite(std::string url, bool addToHistory, bool refresh) { if(urlString.find("gemini://") != std::string::npos) { int sc = site->getStatusCode(); - if(sc >= 20 && sc <= 29) { + if(sc >= 20 && sc <= 29 && id.keyPath == "" && id.crtPath == "") { visitedCache->addSite(urlString, *site); } }