Ask HN: Full-text browser history search forever?
My biggest force-multiplier is my fish shell history, going on 7 years of command line history.
I want to do the same thing for my web browser. At first I looked at Memex but they disabled browser history search. You have to save or annotate an article first before it becomes searchable. My brain, naturally, does not know ahead of time what could be useful in the future.
Is there any product out there that creates a fully searchable full-text history forever with little fuss?
I'm using Firefox on Linux but could switch to another browser (but not OS) if needed.
85 comments
[ 3.2 ms ] story [ 148 ms ] thread[0] https://histre.com/
[1] https://histre.com/articles/customize-logging/
https://github.com/CennoxX/falcon#transparent-installation
As for Firefox, you can right-click the "Add to Firefox" button and save and inspect the extension.
This is all pretty clever and a reasonable implementation imo. I'm not sure what better way there could be using web extensions (that support FTS) - the only thing I could think of is a WASM SQLite module.
EDIT: Perhaps ranking by how much time you've spent reading the content could help with that.
On the other hand, your shell history is already filtered by your brain, it contains mostly potentially useful things.
Then there's also ArchiveBox[2] which can convert your browser history into various formats.
[1] https://github.com/gildas-lormeau/SingleFile
[2] https://github.com/ArchiveBox/ArchiveBox
Put it in "save" mode when using Chrome (linux is fine) and it automatically saves every page you browse (so you can read it offline), and also indexes it for full text search. It's a work in progress and there are bugs (so my advice initialize a git repo in your archive directory, and make regular syncs to a remote in case of failure -- that also gives you a nice snapshotted archive).
Anyway, best of luck to you! :)
Diskernet: https://github.com/crisdosyago/Diskernet
One downside: only works with Chrome-based browsers. Perhaps a way to implement this more generally is as a proxy server.
With an SPA the article might not appear on initial request, but later requests would be JSON which presumably you don't want to return in a search
So this is fine. It won't index a JSON response in an SPA, as search result (tho it does save it), but it will index (and re index) the actual page content, as you browse it and as it updates (eg dynamically loads in an SPA).
Try it out, you'll have an easier time understanding how it works (as long as the current tag release works, heh :) if not try a previous tag).
The problem with MITMing your own browser is (apart from the fact that it is an ugly hack in a security-critical portion of your setup) I don’t think any tool for doing that (including the one you referenced, from what I can find quickly) applies the complex set of important stuff browsers do on top of just verifying chains against a root store.
The bare minimum for me would be HSTS and the HSTS preload list, but I’d also like to see CT and Must-Staple enforcement, OneCRL support, TLD and validity term restrictions for some roots, and so on. (This is more or less what Chrome does from what I know, though I think they have their own equivalent to Mozilla’s OneCRL.)
But, corporate proxies must face similar problems since they, too, MITM things, but I'm deeply thankful that I don't work in such an environment in order to know what the behavior is in that circumstance
I hope this doesn't come across as glib, but ZAP is Apache licensed, so if you are able to come up with the security behavior you want, I'd bet they'd welcome any patches to help implement it
[1] https://iipc.github.io/warc-specifications/
So this is basically Freeware / Shareware in the old days but with Source available? i.e not Open Source as defined by OSS. Do we have a term for it? Shared Source? I know Microsoft tried to use it but it was early 2000 anything M$ did at the time were extremely unpopular.
Will be trying this out soon because I just realise either half of the internet in the past 10 years have eroded, or Google simply cant search something I am sure I read about it 6-7 years ago.
How are you pulling and storing the pages?
For context; I feel like there are quite a lot of solutions here, but not many overlapping and often reinventing many wheels. Memes aside (14->15 standards), i wonder if there's a way i can write my version of this that would benefit others by using common formats we can all benefit from.
edit: Interesting, sounds like it's network/proxy request based. Perhaps there's minimal overlap here?
https://archivebox.io/
[1] https://activitywatch.net/
It is designed for time tracking, and it only saves limited metadata. The browser plugin in particular: time of loading/switching, time spent on page, URL, title, whether the page is audible or incognito, and the tab count.
I am curious how having your history is your greatest force multiplier.
Doing a ctrl + r to fuzzy search the history is very powerful. I could honestly not imagine working without that. Do you never have to type the same command twice, or re-use common commands?
You'd have to compare your .zshrc to their .bashrc
I adopted a save/print to pdf + full text pdf search in case I need something in the future.
Edit: I just tested it, and it's pretty neat! However they note in their Documentation[3] that this is a web cache and not intended to be an archive. It can simply be turned into an archive though by configuring a large cache size.
[1] https://www.lesbonscomptes.com/recoll/
[2] https://addons.mozilla.org/en-US/firefox/addon/recoll-we/
[3] https://www.lesbonscomptes.com/recoll/faqsandhowtos/IndexWeb...
That was back in the day though, before HTTPS was common (outside ecommerce sites, which I didn't care about indexing), and before so many sites were SPAs that got their content via JS APIs. As more sites went to HTTPS, I realized that I'd have to re-write my proxy to MITM certificates if I wanted it to keep working and that wasn't really something I wanted to mess with. The project was useful, but not useful enough that I was willing to dive into the world of writing a browser plugin that could scrape directly from the DOM, so I eventually abandoned it.
menu Tools → Preferences… → Advanced → History → Remember visited addresses for history and autocompletion → [X] Remember content on visited pages
search from address field, history panel or about:historysearch
I use several machines, plus my phone for browsing. As such my (local) browser history is useless, so I tend to turn it off. Also, I am not in control of it from a privacy point of view (who knows what extensions/browser functions are doing with it?)
With my own endpoint, I can then do what I want with the URLs... put them in a database as a cross machine history index, or schedule a job to index the page contents into a personal search engine, etc.
I've never written a browser extension, but I'm guessing that...
...can't be that hard?No full text search included. Might be that grepping through the extension data is reasonably fast, even with multiple years of browsing history, however. I too see this data as valuable, so it's probably better to start capturing now and migrate somewhere else later, rather than wait for your desired browser to implement it.
[1] https://addons.mozilla.org/en-GB/firefox/addon/local-cache/
Different model in that you have to choose what to archive (by hitting a button on a browser extension) but in practice I prefer this to the “trawl everything” model. Ymmv, of course.
But the killer feature for me is that it’s a unified “search-first” interface for _all_ your documents - not just your web browsing.
I have built an app, that allows you to easy access your shell history https://loshadki.app/shellhistory/ and sync via iCloud. MacOS only.
I have a script to extract the last visited website from chrome for example: https://github.com/BarbUk/dotfiles/blob/master/bin/chrome_hi...
For firefox, you can use something like:
sqlite3 ~/.mozilla/firefox/.[dD]efault/places.sqlite "SELECT strftime('%d.%m.%Y %H:%M:%S', visit_date/1000000, 'unixepoch', 'localtime'),url FROM moz_places, moz_historyvisits WHERE moz_places.id = moz_historyvisits.place_id ORDER BY visit_date;"
https://github.com/Y2Z/monolith
There are TONS of projects like Elasticsearch or just raw Lucene that will allow you to parse text and index it.
HTML? Not so much...
There are just to many problems
Text ads polluting the extracted text is by far the main issue but there are other issues as well including OCR of images, AJAX paginated pages, lazy loaded images that might need OCR, metadata extraction (when was the page published, who was the author, etc).
There are some projects that take this on but Google just does an amazing job and these secondary tools are pretty limited by comparison.
95% accuracy doesn't help because that 5% usually ends up being 100% of your false positives.
[0]: https://github.com/mozilla/readability
[1]: https://github.com/go-shiori/go-readability