Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Will Kicking It Help?

macrumors newbie
Original poster
May 23, 2022
16
1
My Firefox history prior to 15 months ago has vanished. I'm using an older operating system, but if there's a way to do it in a more modern system, chances are that way can be extrapolated to an older system.

Just to be clear, I'm not looking to REPLACE the history I have left with the older history, I'd like my end result to be having the current history I still possess AND the older history. Thanks for reading!
 

Bigwaff

Contributor
Sep 20, 2013
1,917
1,265
My Firefox history prior to 15 months ago has vanished.
Are you backing up your Mac?

Where Firefox stores user data...

Just to be clear, I'm not looking to REPLACE the history I have left with the older history, I'd like my end result to be having the current history I still possess AND the older history.
Depending on your answer to the first question, it might be possible.
 
  • Like
Reactions: m4v3r1ck

Will Kicking It Help?

macrumors newbie
Original poster
May 23, 2022
16
1
Are you backing up your Mac?

Where Firefox stores user data...


Depending on your answer to the first question, it might be possible.
Time Machine backs up my files every hour. Whether any Firefox user data is included with that backup I couldn't say; I don't know how to tell.
 

Fishrrman

macrumors Penryn
Feb 20, 2009
28,416
12,540
My amused observation:

I find it intriguing that someone would expect a browser to remember its "complete user history" as far back as 15 months (or even a year).

I don't think many (any?) browser software designers anticipated that someone would expect this from their product. I could be wrong.

A better way might be to once a month save the history page.
Hmmm... tried this with Safari, if you bring up "show all history", it won't let you "save the page".
Don't know about Firefox.

As for me, I use the app named "cookie" to delete all my cookies AND my user history whenever I quit my main browser (Safari).
In other words... I keep no "history" on my Mac, at all. (or at least one that is not so easily found)...
 
  • Like
Reactions: cateye

NoBoMac

Moderator
Staff member
Jul 1, 2014
5,806
4,408
I wouldn't bother. Firefox (and I'm guessing most/all other browsers) will not keep really old history. And then trying to locate a backup with the information, and then trying to get it into a format that Firefox can handle, can spend a lot of time for no real return.

If I recall correctly, Firefox limits automatically/on it own how much history will be saved. In the old days it was a combo of number of URLs and size of the SQLite database managing things. Current Firefox still has the link limit but appears no longer has an option for db size. In Firefox, enter "about:config", then search for "places". Believe one of the values that control this is places.history.expiration.transient_current_max_pages

Can muck around there for the future, but even then, at some point in time, things will drop off the timeline.
 
Last edited:

Will Kicking It Help?

macrumors newbie
Original poster
May 23, 2022
16
1
My amused observation:

I find it intriguing that someone would expect a browser to remember its "complete user history" as far back as 15 months (or even a year).

I don't think many (any?) browser software designers anticipated that someone would expect this from their product. I could be wrong.

A better way might be to once a month save the history page.
Hmmm... tried this with Safari, if you bring up "show all history", it won't let you "save the page".
Don't know about Firefox.

As for me, I use the app named "cookie" to delete all my cookies AND my user history whenever I quit my main browser (Safari).
In other words... I keep no "history" on my Mac, at all. (or at least one that is not so easily found)...
MY amused observation is that it's intriguing that there's anyone who doesn't realize that modern browsers remember browsing history for YEARS. Firefox in particular has no preset time limitation. I've come across someone complaining that they lost history that was FIVE years old;

 
  • Like
Reactions: Ben J.

MacCheetah3

macrumors 68020
Nov 14, 2003
2,114
1,091
Central MN
I get if you needed it as evidence but the fact you want to append/merge is a bit of a head scratcher. If you want your history restored for reference purposes, there are much better methods. Beyond bookmarking…


Or the Apple OS system wide print err save to PDF function:

 

Will Kicking It Help?

macrumors newbie
Original poster
May 23, 2022
16
1
I get if you needed it as evidence but the fact you want to append/merge is a bit of a head scratcher. If you want your history restored for reference purposes, there are much better methods. Beyond bookmarking…


Or the Apple OS system wide print err save to PDF function:

I'm sorry, how does any of this apply to getting back the history that has vanished?
 

MacCheetah3

macrumors 68020
Nov 14, 2003
2,114
1,091
Central MN
I'm sorry, how does any of this apply to getting back the history that has vanished?
So you don't end up in this situation in the future.
:)

Anyway...

Most of what you need was already noted by @Bigwaff in post #2. As for merging -- because there doesn't appear to be a simple, integrated method -- this is what I'd try:

1. Backup your current Firefox profile information (which includes browsing history).
2. Use Time Machine to restore an older version.
3. Copy or move the restored older profile data to the Desktop or some other easy to reference location to work on.
4. Download DB Browser for SQLite.
*** NOTE: I haven't used DB4S in the following manner (i.e., copying and pasting from one DB to another), nor do I have Firefox installed on this Mac to verify what I'll be instructing next.
5. Open the places.sqlite file in DB4S from the restored profile folder.
This file contains all your Firefox bookmarks and lists of all the files you've downloaded and websites you’ve visited.
6. Locate and copy the browsing history table/records.
7. Open the places.sqlite file in DB4S from the recently backed up profile folder.
8. Add (i.e., paste) the records from the older DB.
 

Will Kicking It Help?

macrumors newbie
Original poster
May 23, 2022
16
1
So you don't end up in this situation in the future.
:)

Anyway...

Most of what you need was already noted by @Bigwaff in post #2. As for merging -- because there doesn't appear to be a simple, integrated method -- this is what I'd try:

1. Backup your current Firefox profile information (which includes browsing history).
2. Use Time Machine to restore an older version.
3. Copy or move the restored older profile data to the Desktop or some other easy to reference location to work on.
4. Download DB Browser for SQLite.
*** NOTE: I haven't used DB4S in the following manner (i.e., copying and pasting from one DB to another), nor do I have Firefox installed on this Mac to verify what I'll be instructing next.
5. Open the places.sqlite file in DB4S from the restored profile folder.

6. Locate and copy the browsing history table/records.
7. Open the places.sqlite file in DB4S from the recently backed up profile folder.
8. Add (i.e., paste) the records from the older DB.
Saving hundreds of websites a day to my computer is not feasible in terms of time or storage space, and there's no way to either save or "print" from the history pane, so, unfortunately, neither of these things would help in preserving history.

For reasons that I can't even guess, Time Machine only backs up those profile pages for a day and about 4 hours; there is no backup to access.

A website that can open up places.sqlite let me download a bunch of stuff, and one of those files definitely contains history data… here's what the entry for one visited website looks like:

"6937","https://www.biblegateway.com/","BibleGateway.com: A searchable online Bible in over 150 versions and 50 languages.","moc.yawetagelbib.www.","32","0","1","null","20342","1713391378928017","FJGRqneH3rrL","0","47360599273633","Read, hear, and study Scripture at the world's most-visited Christian website. Grow your faith with devotionals, Bible reading plans, and mobile apps.","https://www.biblegateway.com/assets/images/logos/logo_bg-sharing.png?2f76685f","517","null","0","null","1"

You'll notice that there is no date and time for this entry. In addition, it only shows the "front page" for the website, it does NOT show what pages I accessed on the site; this is the case for many websites, although interestingly not all.

That's just included for the sake of completeness… because it's a moot point, since, in over 15 THOUSAND pages of whatever this is, the earliest "specific entry" can be identified as being in the same zone as my earliest history entry… 15 months ago.

So, if the prior history is still on my computer somewhere, it's somewhere ELSE.
 

FreakinEurekan

macrumors 603
Sep 8, 2011
5,615
2,684
MY amused observation is that it's intriguing that there's anyone who doesn't realize that modern browsers remember browsing history for YEARS. Firefox in particular has no preset time limitation. I've come across someone complaining that they lost history that was FIVE years old;

I guess that's another clue that trying to rely on browser history isn't a good way to retain data...
 

NoBoMac

Moderator
Staff member
Jul 1, 2014
5,806
4,408
Actually, there is a time and date entry. "1713391378928017". SQLite uses number of seconds since 01/01/1970 for timestamps, but that number is too big to be standard: looks like Firefox is adding some extra info in there. "1713391378" would be April 17, 2024 ~18:02 EDT.

Code:
CREATE TABLE moz_places (id INTEGER PRIMARY KEY, url LONGVARCHAR, title LONGVARCHAR, rev_host LONGVARCHAR, visit_count INTEGER DEFAULT 0, hidden INTEGER DEFAULT 0 NOT NULL, typed INTEGER DEFAULT 0 NOT NULL, favicon_id INTEGER, frecency INTEGER DEFAULT -1 NOT NULL, last_visit_date INTEGER, guid TEXT, foreign_count INTEGER DEFAULT 0 NOT NULL, url_hash INTEGER DEFAULT 0 NOT NULL, description TEXT, preview_image_url TEXT, origin_id INTEGER REFERENCES moz_origins(id), site_name TEXT, recalc_frecency INTEGER NOT NULL DEFAULT 0, alt_frecency INTEGER, recalc_alt_frecency INTEGER NOT NULL DEFAULT 0);

EDIT: Close re seconds since 01/01/1970. Per this webpage, it appears Firefox is using microseconds vs standard epoch seconds.

The datetime(moz_historyvisits.visit_date/1000000,'unixepoch') part is responsible for converting the Unix epoch time written in the database into a human-readable date and time stamp such as 2024-05-01 17:30:34.
 
Last edited:

Ben J.

macrumors 6502a
Aug 29, 2019
669
358
Oslo
FWIW, my Firefox history window shows all visited sites since april 2021.
I don't know if that means it's limited to three years, or if I actually did my last clean install three years ago, I can't remember.

I also found that I can easily select all or any of the links in history, and copy/paste them.
 

Will Kicking It Help?

macrumors newbie
Original poster
May 23, 2022
16
1
Actually, there is a time and date entry. "1713391378928017". SQLite uses number of seconds since 01/01/1970 for timestamps, but that number is too big to be standard: looks like Firefox is adding some extra info in there. "1713391378" would be April 17, 2024 ~18:02 EDT.

Code:
CREATE TABLE moz_places (id INTEGER PRIMARY KEY, url LONGVARCHAR, title LONGVARCHAR, rev_host LONGVARCHAR, visit_count INTEGER DEFAULT 0, hidden INTEGER DEFAULT 0 NOT NULL, typed INTEGER DEFAULT 0 NOT NULL, favicon_id INTEGER, frecency INTEGER DEFAULT -1 NOT NULL, last_visit_date INTEGER, guid TEXT, foreign_count INTEGER DEFAULT 0 NOT NULL, url_hash INTEGER DEFAULT 0 NOT NULL, description TEXT, preview_image_url TEXT, origin_id INTEGER REFERENCES moz_origins(id), site_name TEXT, recalc_frecency INTEGER NOT NULL DEFAULT 0, alt_frecency INTEGER, recalc_alt_frecency INTEGER NOT NULL DEFAULT 0);

EDIT: Close re seconds since 01/01/1970. Per this webpage, it appears Firefox is using microseconds vs standard epoch seconds.
There should really be some sort of award for figuring that out! Totally useless for me to use even if it was the stuff I'm looking for… But sometimes there's really interesting stuff that has no practical application to our lives. It's still interesting!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.