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:
ER diagram

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).

Advertisements

One thought on “Showing History of Visits in Mozilla Firefox

  1. Awesome! I’m thinking I 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 thel 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).

    Liked by 1 person

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.