This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

ابحث في الدعم

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Why Firefox suddenly start to delete my history before 3 months ago

  • 7 ردود
  • 0 have this problem
  • 1 view
  • آخر ردّ كتبه IceTemple

more options

This story is a bit long, but please be patient.

I have used firefox for over 10 years, it can keep about a year's or 1.5 year's history (randomly expiration). So, I save places.sqlite per half year if I remember.

I have so many places.sqlite's backups. These backups proved that, in the past, firefox only delete some "expired" history records about one year ago or earlier in these years.

But suddenly Firefox started to only keep history in 3 months.

I save my profile in a path : "C:\Users\Admin\Documents\Firefox" and use -profile C:\Users\Admin\Documents\Firefox in shortcut.

And let's tell what happened(a bit complicated.)

I installed windows 10 in 24, July, in another harddisk. I entered the new windows, installed a firefox, and used my old profile as usual. It looks normal, until I returned to my old Windows 10, I noticed that, my history is kept for only three months and the left is gone.


I first thought that, the version in the new windows had wrong settings and deleted the old history, so I restored the backup, which is 2021.6.4-2022.7.24. But Firefox continued to delete my old "expired" history, after a while. This never happened before. (I am still in old windows now, from now on everything happened in old Windows 10)


Ok, I assumed that the new firefox in new windows 10 "comtaminated" my whole profile. After a really hard try I still can't find out what is the comtamination. So I created a brand new profile, copied:

all extensions and its settings, cookies, passwords, etc. just a few json and sqlite files.

And then I recovered the places.sqlite with my 2021.6.4-2022.7.24 version, which has about 60,000+ history.


And---guess what, firefox still deleted my old history.

This never happened before, for so many years.

Firefox used to delete "expired" history, that's true, but still can keep more than a year's records. But since I installed the new windows everything changed. I don't know why, and I don't even know their correlation between all these things.

I have to keep history more than a year because I need to check many records. 3 months is unacceptable.

Version: 102; which is months ago's version but it still delete my history! Actually I tried 100-104, same results.

I tried every possible idea, but it just delete my old history.

In conclusion, since the firefox(not international version, but local version by our country's official web) "comtaminated" my profile, I can no longer return the status that firefox keeps more than 1 years's record. I tried all possible methods, for example make a clean new firefox and only put my old places.sqlite(2021.6.4-2022.7.24) inside, but it just delete it to only 3 months left.

Everything sounds like magic. But I am a programmer too, and I don't believe magic. I checked the source code of history expiration. (decko-dev )(Yes, it doesn't have anyway to absolutely ensure preventing from deleting, but I can't find any code that just precisely keep 90 days' history, either.) I am not sure whether I found the right place.

My questions are below: 1. If firefox doesn't keep so many records all the time, then why I have so many backups with more than a timespan of 1+ years in these years(from firefox 20+ to now)? I used firefox for many years, I changed my profile or create new profile for so many times with so many versions, but none of them delete my history only 3 months left, at least give me one year+ left. 2.Did I correctly find the correct source code? 3.What triggered the firefox started to delete my "expired" history so precisely, only 90 days left? 4.I need a method to return to before 24.June, the time firefox history manager works well.

I am not local, so some words may be wierd, please forgive me. Any any information will help.

This story is a bit long, but please be patient. I have used firefox for over 10 years, it can keep about a year's or 1.5 year's history (randomly expiration). So, I save places.sqlite per half year if I remember. I have so many places.sqlite's backups. '''These backups proved that, in the past, firefox only delete some "expired" history records about one year ago or earlier in these years.''' But suddenly Firefox started to only keep history in 3 months. I save my profile in a path : "C:\Users\Admin\Documents\Firefox" and use -profile C:\Users\Admin\Documents\Firefox in shortcut. And let's tell what happened(a bit complicated.) I installed windows 10 in 24, July, in another harddisk.''' I entered the new windows, installed a firefox, and used my old profile as usual. It looks normal, until I returned to my old Windows 10, I noticed that, my history is kept for only three months and the left is gone. I first thought that, the version in the new windows had wrong settings and deleted the old history, so I restored the backup, which is 2021.6.4-2022.7.24. But Firefox continued to delete my old "expired" history, after a while. This never happened before. (I am still in old windows now, from now on everything happened in old Windows 10) Ok, I assumed that the new firefox in new windows 10 "comtaminated" my whole profile. After a really hard try I still can't find out what is the comtamination. So I created a brand new profile, copied: all extensions and its settings, cookies, passwords, etc. just a few json and sqlite files. And then I recovered the places.sqlite with my 2021.6.4-2022.7.24 version, which has about 60,000+ history. And---guess what, firefox still deleted my old history. This never happened before, for so many years. Firefox used to delete "expired" history, that's true, but still can keep more than a year's records. But since I installed the new windows everything changed. I don't know why, and I don't even know their correlation between all these things. I have to keep history more than a year because I need to check many records. 3 months is unacceptable. Version: 102; which is months ago's version but it still delete my history! Actually I tried 100-104, same results. I tried every possible idea, but it just delete my old history. In conclusion, since the firefox(not international version, but local version by our country's official web) "comtaminated" my profile, I can no longer return the status that firefox keeps more than 1 years's record. I tried all possible methods, for example make a clean new firefox and only put my old places.sqlite(2021.6.4-2022.7.24) inside, but it just delete it to only 3 months left. Everything sounds like magic. But I am a programmer too, and I don't believe magic. I checked the source code of history expiration. ([https://github.com/mozilla/gecko-dev/blob/261722b340ad0621b5ff8cb450d2c242b4c7254d/toolkit/components/places/PlacesExpiration.sys.mjs decko-dev] )(Yes, it doesn't have anyway to absolutely ensure preventing from deleting, but I can't find any code that just precisely keep 90 days' history, either.) I am not sure whether I found the right place. My questions are below: 1. If firefox doesn't keep so many records all the time, then why I have so many backups with more than a timespan of 1+ years in these years(from firefox 20+ to now)? I used firefox for many years, I changed my profile or create new profile for so many times with so many versions, but none of them delete my history only 3 months left, at least give me one year+ left. 2.Did I correctly find the correct source code? 3.What triggered the firefox started to delete my "expired" history so precisely, only 90 days left? 4.I need a method to return to before 24.June, the time firefox history manager works well. I am not local, so some words may be wierd, please forgive me. Any any information will help.
Attached screenshots

الحل المُختار

Current Firefox versions keep a maximum number of visited page and do not have a time limit for the history. Firefox determines how many pages can be kept without affecting performance. In current releases you can find this value if the click "Verify Integrity" on the "Help -> More Troubleshooting Information" (about:support) page.

  • History can store a maximum of xxx unique pages

You can also calculate this value via the command line in the Browser Console.

Read this answer in context 👍 1

All Replies (7)

more options

الحل المُختار

Current Firefox versions keep a maximum number of visited page and do not have a time limit for the history. Firefox determines how many pages can be kept without affecting performance. In current releases you can find this value if the click "Verify Integrity" on the "Help -> More Troubleshooting Information" (about:support) page.

  • History can store a maximum of xxx unique pages

You can also calculate this value via the command line in the Browser Console.

more options

cor-el said

Current Firefox versions keep a maximum number of visited page and do not have a time limit for the history. Firefox determines how many pages can be kept without affecting performance. In current releases you can find this value if the click "Verify Integrity" on the "Help -> More Troubleshooting Information" (about:support) page.
  • History can store a maximum of xxx unique pages

You can also calculate this value via the command line in the Browser Console.

Look, the number of history is far less than the maximum value! What's more, when I post this thread, the earliest history is May 2 1:22; and now it is May 2 3:41. It is so precise 3 month. Is there another anything can control it? I did installed the official version from our country's proxy of mozilla Official in the new windows 10(in another disk),which contaminated the profile, but the profile I used is created from my intertional version from mozilla's ftp, and the exact list I moved from the old profile is: extension.json extension[folder] cookies/passwords/favicon/search.json

So, seems that the only possible, possible reason is some extensions from the "official" deletes my history without any hints. But which is still odds, because I use my old profile in the new "official" firefox with the old -profile command, it shouldn't have any chance to install these extrnsions.

What do you think? Now, I am going to uninstall all these plugins and I think there will be a result hours later.


> Task: checkIntegrity + The places.sqlite database is sane + The favicons.sqlite database is sane > Task: invalidateCaches + The caches have been invalidated > Task: checkCoherence + The database is coherent > Task: expire + Database cleaned up > Task: originFrecencyStats + Recalculated origin frecency stats > Task: vacuum + Initial database size is 25600KiB + The database has been vacuumed + Final database size is 25600KiB > Task: stats + Places.sqlite size is 25600KiB + Favicons.sqlite size is 1248KiB + pragma_user_version is 67 + pragma_page_size is 32768 + pragma_cache_size is -2048 + pragma_journal_mode is wal + pragma_synchronous is 1 + History can store a maximum of 9499999 unique pages + Table moz_origins has 2774 records + Table moz_places has 41773 records + Table moz_historyvisits has 52371 records + Table moz_inputhistory has 27 records + Table moz_bookmarks has 644 records + Table moz_bookmarks_deleted has 0 records + Table moz_keywords has 0 records + Table sqlite_sequence has 1 records + Table moz_anno_attributes has 3 records + Table moz_annos has 872 records + Table moz_items_annos has 0 records + Table moz_meta has 8 records + Table sqlite_stat1 has 18 records + Table moz_places_metadata has 0 records + Table moz_places_metadata_search_queries has 0 records + Table moz_places_metadata_snapshots has 0 records + Table moz_places_metadata_snapshots_extra has 0 records + Table moz_places_metadata_snapshots_groups has 0 records + Table moz_places_metadata_groups_to_snapshots has 0 records + Table moz_session_metadata has 0 records + Table moz_session_to_places has 0 records + Table moz_previews_tombstones has 0 records + Pages sequentiality: 57.9 + sqlite_schema: 32KiB (0.1%), 30.1% eff. + moz_inputhistory: 32KiB (0.1%), 2.3% eff. + sqlite_autoindex_moz_inputhistory_1: 32KiB (0.1%), 1.7% eff. + moz_bookmarks_deleted: 32KiB (0.1%), 0% eff. + sqlite_autoindex_moz_bookmarks_deleted_1: 32KiB (0.1%), 0% eff. + moz_keywords: 32KiB (0.1%), 0% eff. + sqlite_autoindex_moz_keywords_1: 32KiB (0.1%), 0% eff. + sqlite_sequence: 32KiB (0.1%), 0.1% eff. + moz_anno_attributes: 32KiB (0.1%), 0.3% eff. + sqlite_autoindex_moz_anno_attributes_1: 32KiB (0.1%), 0.3% eff. + moz_items_annos: 32KiB (0.1%), 0% eff. + moz_meta: 32KiB (0.1%), 1.1% eff. + sqlite_stat1: 32KiB (0.1%), 3.1% eff. + moz_places_metadata: 32KiB (0.1%), 0% eff. + moz_places_metadata_search_queries: 32KiB (0.1%), 0% eff. + sqlite_autoindex_moz_places_metadata_search_queries_1: 32KiB (0.1%), 0% eff. + moz_places_metadata_snapshots: 32KiB (0.1%), 0% eff. + moz_places_metadata_snapshots_extra: 32KiB (0.1%), 0% eff. + moz_places_metadata_snapshots_groups: 32KiB (0.1%), 0% eff. + moz_places_metadata_groups_to_snapshots: 32KiB (0.1%), 0% eff. + moz_session_metadata: 32KiB (0.1%), 0% eff. + sqlite_autoindex_moz_session_metadata_1: 32KiB (0.1%), 0% eff. + moz_session_to_places: 32KiB (0.1%), 0% eff. + moz_previews_tombstones: 32KiB (0.1%), 0% eff. + moz_bookmarks_itemindex: 32KiB (0.1%), 21.9% eff. + moz_bookmarks_parentindex: 32KiB (0.1%), 22% eff. + moz_bookmarks_itemlastmodifiedindex: 32KiB (0.1%), 37.5% eff. + moz_bookmarks_dateaddedindex: 32KiB (0.1%), 31.1% eff. + moz_bookmarks_guid_uniqueindex: 32KiB (0.1%), 39% eff. + moz_keywords_placepostdata_uniqueindex: 32KiB (0.1%), 0% eff. + moz_annos_placeattributeindex: 32KiB (0.1%), 34.6% eff. + moz_items_annos_itemattributeindex: 32KiB (0.1%), 0% eff. + moz_places_metadata_placecreated_uniqueindex: 32KiB (0.1%), 0% eff. + moz_places_metadata_referrerindex: 32KiB (0.1%), 0% eff. + moz_places_metadata_snapshots_pinnedindex: 32KiB (0.1%), 0% eff. + moz_places_metadata_snapshots_extra_typeindex: 32KiB (0.1%), 0% eff. + moz_origins: 128KiB (0.5%), 73.2% eff. + sqlite_autoindex_moz_origins_1: 128KiB (0.5%), 67.7% eff. + moz_bookmarks: 128KiB (0.5%), 57.4% eff. + moz_annos: 160KiB (0.7%), 66.9% eff. + moz_places_visitcount: 416KiB (1.7%), 89% eff. + moz_places_frecencyindex: 448KiB (1.8%), 91.3% eff. + moz_places_originidindex: 480KiB (2%), 90.4% eff. + moz_historyvisits_fromindex: 608KiB (2.5%), 93.6% eff. + moz_places_url_hashindex: 672KiB (2.8%), 91% eff. + moz_places_lastvisitdateindex: 736KiB (3%), 93.7% eff. + moz_places_guid_uniqueindex: 896KiB (3.7%), 95.6% eff. + moz_historyvisits_dateindex: 928KiB (3.8%), 93.7% eff. + moz_places_hostindex: 1024KiB (4.2%), 96.6% eff. + moz_historyvisits_placedateindex: 1120KiB (4.6%), 95.8% eff. + moz_historyvisits: 1408KiB (5.8%), 95.5% eff. + moz_places: 13792KiB (56.9%), 99% eff. > Task: _refreshUI

more options

Are you overriding the maximum history visits via places.history.expiration.max_pages as "9499999 unique pages" looks quite large ?

In that case it is possible that you choose a value too high that is ignored and can try a lower value (999999) to see if that works as expected.

Modified by cor-el

more options

cor-el said

Are you overriding the maximum history visits via places.history.expiration.max_pages as "9499999 unique pages" looks quite large ? In that case it is possible that you choose a value too high that is ignored and can try a lower value (999999) to see if that works as expected.

I removed the 5 extensions that the "Official local version" automatically installed, though it still deleted some of my records(I can see the process of the earliest records vanishing one by one). And I logout the sync account, it stoped at 3 August 2021. with a few (<20) between 3/Aug/2021 and 5/May/2021 left.

And until now, most records are still here. No longer delete to 3 months left.

So now, in conclusion, it seems only 3 factor effects: 1. the extensions(they are just something like homepage, extensions manager, etc.) from the Official version. 2.places.history.expiration.max_pages set to 501234 3.close the sync, log out the account.


I will do more experinment to find out exactly what is the real factor that delete my records to within 3 months, and report here afterwards. (the expiration is randomly, so it may take some time)


By the way, Is there any hacky way, I mean, by hook or by crook to make firefox keep all the history---which means, disable the expiration function completely?

more options

cor-el

Are you overriding the maximum history visits via places.history.expiration.max_pages as "9499999 unique pages" looks quite large ? In that case it is possible that you choose a value too high that is ignored and can try a lower value (999999) to see if that works as expected.

Now it is clear that the extension manager"(附加组件管理器) along with the Chinese official version, automatically delete all the history 3 month ago, without any permission/hint/description in the plugin. This plugin can't be found in the extension store so I can't give the store. This extension contaminated my profile. I have never though of that such an extension was the source of pollution.

Mozilla official really should pay attention to such an arbitary behavior, it is like malware and trojan, delete user's data without any trace.

If there is a complain way, it should be better.

And thank you so much for your help, it is very important, helped me to exclude the impossibilities and than I can finally catch the murderer.

Modified by IceTemple

more options

Is that extension listed in extensions.json in the Firefox profile folder ?

You can use the button on the "Help -> More Troubleshooting Information" (about:support) page to go to the current Firefox profile folder or use the about:profiles page (Root directory).

more options

cor-el said

Is that extension listed in extensions.json in the Firefox profile folder ? You can use the button on the "Help -> More Troubleshooting Information" (about:support) page to go to the current Firefox profile folder or use the about:profiles page (Root directory).

Well, I am told that this extension has the settings that clearly said delete history, which I never noticed before, so it's over.