, 1 min read

Showing History of Visits in Mozilla Firefox

Original post is here eklausmeier.goip.de/blog/2019/05-19-showing-history-of-visits-in-mozilla-firefox.


If one needs to know when some website has been visited in Mozilla Firefox then go to the default directory and open the places.sqlite file:

cd ~/.mozilla/firefox/<xyz>.default/
sqlite3 places.sqlite

Issue below SQL command

select visit_date,
       datetime(visit_date/1000000, 'unixepoch','localtime') as S
from moz_historyvisits
where place_id in
       (select id from moz_places where url like 'https://www.google.come%')
and S like '2019-01-2%'
order by S;

References:

  1. How do I decode the Last_Date_ Visited field in the places.sqlite db?
  2. SQLite: Date And Time Functions
  3. Entity relationship diagram of tables: The Places database

ER diagram looks like this: Photo

Added 30-Jun-2019: Interesting comment from Ronald Scheckelhoff from 19-May-2019 on caching DNS entries of previously visited URLs.

... could use this database to collect an overall sample of my web surfing habits, and then plug that data into something like the Unbound DNS resolver to do my own DNS lookups for the places I usually visit. I was doing that with Squid, but it has some limitations for my situation. Maybe this is better (plus, I don’t have to use Squid).