Search Support

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

Prevent Firefox from deleting old history

more options

It seems that Firefox is deleting my old search history. How can I prevent this?

I've already tried the solution described here: https://support.mozilla.org/en-US/questions/1079400 but without luck: e.g. places.history.expiration.transient_current_max_pages seems to be missing

All of the questions I've found on this topic are quite old. Any new ways of fixing it? (or maybe I'm doing something wrong)

It seems that Firefox is deleting my old search history. How can I prevent this? I've already tried the solution described here: https://support.mozilla.org/en-US/questions/1079400 but without luck: e.g. places.history.expiration.transient_current_max_pages seems to be missing All of the questions I've found on this topic are quite old. Any new ways of fixing it? (or maybe I'm doing something wrong)
Attached screenshots

Chosen solution

Just to clarify, Firefox has two different buckets:

  • Search and form history (search keywords and text entered into forms)
  • Browsing history (full URLs)

Browsing history can be enormous, but Firefox does cap it based on disk capacity. For example, mine reports:

+ History can store a maximum of 112348 unique pages

That mean after I have visited 112348 unique URLs, when I visit more URLs, some of the old ones will be deleted. The actual current number of URLs is listed in a different row of the report:

+ Table moz_places has 434 records [from a test profile, not my main one]

To find that information for your own Firefox, you can run the Verify Integrity function. Open Firefox's Troubleshooting Information page using any of these methods:

  • "3-bar" menu button > Help > More Troubleshooting Information
  • (menu bar) Help > More Troubleshooting Information
  • type or paste about:support in the address bar and press Enter

Near the bottom, there is a section titled Places Database -- that's the file which stores history and bookmarks. Click the button labeled Verify Integrity. There may be a 10-15 second delay before results appear. Once you have the report, click the list to enable scrolling down.

What if you want to override the automatically calculated cap?

You can, but if you are low on disk space, it's not recommended. (There might also be a slightly higher risk of corruption and data loss with a larger file.) Here's how you would do it if necessary:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

More info on about:config: Configuration Editor for Firefox. The moderators would like us to remind you that changes made through this back door aren't fully supported and aren't guaranteed to continue working in the future. Since we have had this setting for a long time and I use it myself, I feel comfortable mentioning it.

(2) In the search box in the page, type or paste places.history.expiration.max_pages and pause while the list is filtered

If there is an existing preference with a numeric value, skip to step 4.

(3) Click the radio button next to Number and then click the + button to add a new preference

(4) Enter the desired maximum number of unique URLs, for example, 200000 -- be careful not to enter a low number in case it triggers a bulk deletion -- and then press Enter or click the blue check mark button to save the change.

Read this answer in context 👍 1

All Replies (4)

more options

Chosen Solution

Just to clarify, Firefox has two different buckets:

  • Search and form history (search keywords and text entered into forms)
  • Browsing history (full URLs)

Browsing history can be enormous, but Firefox does cap it based on disk capacity. For example, mine reports:

+ History can store a maximum of 112348 unique pages

That mean after I have visited 112348 unique URLs, when I visit more URLs, some of the old ones will be deleted. The actual current number of URLs is listed in a different row of the report:

+ Table moz_places has 434 records [from a test profile, not my main one]

To find that information for your own Firefox, you can run the Verify Integrity function. Open Firefox's Troubleshooting Information page using any of these methods:

  • "3-bar" menu button > Help > More Troubleshooting Information
  • (menu bar) Help > More Troubleshooting Information
  • type or paste about:support in the address bar and press Enter

Near the bottom, there is a section titled Places Database -- that's the file which stores history and bookmarks. Click the button labeled Verify Integrity. There may be a 10-15 second delay before results appear. Once you have the report, click the list to enable scrolling down.

What if you want to override the automatically calculated cap?

You can, but if you are low on disk space, it's not recommended. (There might also be a slightly higher risk of corruption and data loss with a larger file.) Here's how you would do it if necessary:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

More info on about:config: Configuration Editor for Firefox. The moderators would like us to remind you that changes made through this back door aren't fully supported and aren't guaranteed to continue working in the future. Since we have had this setting for a long time and I use it myself, I feel comfortable mentioning it.

(2) In the search box in the page, type or paste places.history.expiration.max_pages and pause while the list is filtered

If there is an existing preference with a numeric value, skip to step 4.

(3) Click the radio button next to Number and then click the + button to add a new preference

(4) Enter the desired maximum number of unique URLs, for example, 200000 -- be careful not to enter a low number in case it triggers a bulk deletion -- and then press Enter or click the blue check mark button to save the change.

more options

Note that this maximum is calculated in getPagesLimit(), but is no longer stored in the transient_current_max_pages pref (85).

more options

Thanks for the detailed explanation!

However, I think that the calculated cap is not an issue in my case:

+ History can store a maximum of 149229 unique pages + Table moz_origins has 4030 records + Table moz_places has 69232 records + Table moz_historyvisits has 125637 records

Is it possible that Firefox changed the cap when I was low on disk space (only on the C drive) to a very low value? (I had ~30-60 GB free space on C) and as a consequence deleted many records?

PS: I'm not sure if this changes anything, but I'm using Sync with other devices e.g. a mobile phone.

EDIT: I've checked getPagesLimit() and it seems that this shouldn't be the case either.

Modified by RAR

more options

If you can store 149229 unique pages and you only have 69232 records currently, you shouldn't be losing anything more for quite a while. However, that doesn't help with past trims... If you want to prevent recalculation in the future, you can set the preference I mentioned.