Rechercher dans l’assistance

Évitez les escroqueries à l’assistance. Nous ne vous demanderons jamais d’appeler ou d’envoyer un SMS à un numéro de téléphone ou de partager des informations personnelles. Veuillez signaler toute activité suspecte en utilisant l’option « Signaler un abus ».

Learn More

History is being lost

  • 16 réponses
  • 0 a ce problème
  • 326 vues
  • Dernière réponse par Eric_Kvaalen

more options

This morning I noticed that my Firefox history has lost everything before April 2018. Fortunately I have another computer in sync with the first computer, and I was able to transfer the file places.squlite and recover my history. But why did it happen? And it's not the first time. Last year I lost from 2015 to 2017 or so. How can I prevent this from happening again?

This morning I noticed that my Firefox history has lost everything before April 2018. Fortunately I have another computer in sync with the first computer, and I was able to transfer the file places.squlite and recover my history. But why did it happen? And it's not the first time. Last year I lost from 2015 to 2017 or so. How can I prevent this from happening again?

Solution choisie

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 create a new Number pref named places.history.expiration.max_pages if you want to override the automatically calculated number of pages. Be cautious though with modifying the value of this pref.

Lire cette réponse dans son contexte 👍 0

Toutes les réponses (16)

more options

Solution choisie

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 create a new Number pref named places.history.expiration.max_pages if you want to override the automatically calculated number of pages. Be cautious though with modifying the value of this pref.

more options

Thanks. I added a zero at the end of that parameter, so it should be good now. Too bad Firefox didn't warn me before I lost 2015-2017.

more options

I have just looked on my newer computer in order to change that parameter, and it's not there when I do about:config. Why not?

more options

This pref isn't present by default and needs to be created when you want to adjust this setting like I wrote above: You can create a new Number pref named places.history.expiration.max_pages

more options

OK, thanks. I didn't notice that. When i did this on my other computer the other day, the parameter was already there! I certainly didn't add it.

more options

See also the comment in the source code.

// Max number of unique URIs to retain in history.
// Notice this is a lazy limit.  This means we will start to expire if we will
// go over it, but we won't ensure that we will stop exactly when we reach it,
// instead we will stop after the next expiration step that will bring us
// below it.
// If this preference does not exist or has a negative value, we will
// calculate a limit based on current hardware.
more options

Thanks. But I don't understand much of that. Maybe it means it created places.history.expiration.max_pages automatically on one of my two computers, based on hardware.

In any case, I've set it in both computers to around 1,600,000 so that ought to prevent problems.

more options

Again it happened! I've lost my history from before July 2020.

When I look to see the value of places.history.expiration.max_pages, it's not there. On my other computer, it's still there, set to 1,600,000. But on this computer there's only a parameter called places.history.expiration.transiet_current_max_pages.

Why did the parameter disappear? Is it because a new version got downloaded and installed (automatic'ly)? This is really a nuisance!

more options

places.history.expiration.max_pages doesn't exist by default as Firefox determines automatically 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

Previously this count was stored in places.history.expiration.transient_current_max_pages, but this is no longer the case in 85+ (you can click the trashcan to reset/remove this pref). You can create a new Number pref named places.history.expiration.max_pages if you want to override the automatically calculated number of pages. Be cautious though with modifying the value of this pref.

more options

Thanks, but I already created the parameter (see my post above on April 14). I set places.history.expiration.max_pages to 1600000! But today when I checked, it didn't exist anymore.

I managed to transfer the history from my other computer, but I want to avoid having this happen again.

more options

You shouldn't make this pref arbitrarily large as I'm not sure whether how large value it accepts (try:999999).

more options

Isn't Firefox open-source? Isn't there someone who would know? How can I find out?

Note that the history worked fine from April till now.

By the way, although places.history.expiration.max_pages disappeared, there was a parameter called places.history.expiration.transiet_current_max_pages which had a value somewhat more than 1,600,000. That may have been the value I gave for places.history.expiration.max_pages back in April (as I wrote above, I simply added a zero to the value that was there before). So it's not as though the value disappeared, but its name got changed and it was ignored!

more options

There no pref name change. places.history.expiration.transient_current_max_pages (not places.history.expiration.transiet_current_max_pages with a missing 'n' like you wrote) was previously used to show/save the automatically calculated max pages value and is a read-only pref and changing its value didn't had effect, but since this pref is no longer used then changing it keeps the modified value. This max_pages value was calculated when Firefox started and thus added to the startup time and they decided to calculate this value lazily at a later time when it was needed and no longer store it in a pref. You always have been able to create a Number pref named places.history.expiration.max_pages to override this calculated value, this pref doesn't exist by default and always needs to be created as a new Number pref.

more options

But is there a way I can find out from one of the people who write Firefox how to prevent this problem?

more options

You can read comments in the source code:

/**
 * What this is aimed to test:
 *
 * Expiration will obey to hardware spec, but user can set a custom maximum
 * number of pages to retain, to restrict history, through
 * "places.history.expiration.max_pages".
 * This limit is used at next expiration run.
 * If the pref is set to a number < 0 we will use the default value.
 */

https://searchfox.org/mozilla-central/source/toolkit/components/places/tests/expiration/test_pref_maxpages.js#10

more options

So it sounds as though places.history.expiration.max_pages is meant for keeping the history file short, not for making sure it doesn't get chopped! In other words, it sound as though the Places file can go over the hardware limit and over the places.history.expiration.max_pages limit, but if it goes over one of those then eventually it will get chopped down to be below both! In that case, there's nothing I can do, except maybe buy a new disk so that my hardware limit goes up. The problem has occurred twice, both times on a laptop that has only 60 giga of disk and is fairly full. What do you think?