Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to set up Firefox in a way that it absolutely never removes any items from its history (automatically)?

In the past maybe there were a 'keep all history items', then you could set it from menu to a big integer like 999999999 in days.

Since, first unnoticed, this setting was gone, I currently resolved to backing up places.sqlite (on win, in %Appdata%\Mozilla\Firefox\Profiles\<some-profilename>\places.sqlite).

Let's say I won't upgrade without checking that my backup method still works:

How can one today set Firefox v22 to keep all history items?

I've already set these values in about.config.


still I have bookmarks older than the oldest history item in the database; although I cannot recall when I set these settings!

So is this sufficient? Are these good values? Are there other or better ways to do this (eg. an addon).

share|improve this question
@Richard I remember doing things far away in the past but cannot recall exact URLs. I recall them longer than these artificial history file&time limit in history. Chances are I haven't bookmarked a site that was of no interest to me then but is of interest now. And I really don't like to start searching for something that I've already found once and found good enough to remember it, as time has told at this point. And I want to keep this data locally, because it's noone else's business. – n611x007 Sep 19 '13 at 13:56
@cybernard about Evernote, there is no point, I mean I could just use bookmarks, but the problem is that at the time of visiting I cannot foresee the value of the page on the coming days; bookmarks would be easier than taking a note and I do use a lot of bookmarks but here I need exactly the ones that I didn't bookmarked/noted. About entry, you mean the about:config entries? Is it from experience that Firefox respects them? Putting in as much 9s as possible sounds like Cargo Cult and if it's proven ineffective, I will be left empty handed – n611x007 Sep 20 '13 at 9:47
Since the release of Firefox 4.0.x, the number of days Firefox will retain history for is directly related to system hardware. Firefox calculates how much history to retain without impacting system performance. You can't change it anymore. – krowe Sep 21 '13 at 4:59
reference for firefox deleting history based on system: – Achal Dave Apr 6 '14 at 22:12
@AchalDave, I believe that link is about a future project. Whereas current implementation is described at – user Jan 9 at 19:45

4 Answers 4

You could run a private Firefox Sync server, and set the History retain size to 1 GB, or something insane like that. As far as I know, it will not delete history, and you'll be able to see that entire history on any browser instance you sync.

share|improve this answer
Where do I set the History retain size (in either Firefox or weave-minimal)? I've checked Firefox options/sync but I only saw quota read, and command-line options to weave-minimal but I haven't seen one regarding history retain size. – n611x007 Oct 18 '13 at 6:50
Note: weave-minimal doesn't support the current sync API. You can still run your own instance of the official sync server, but it doesn't have many configurable options — you'd have to patch it to apply a custom history retention policy (I haven't looked any further into it). – Cauterite Nov 4 at 11:10

There is now a proper solution (Firefox v40): places.history.expiration.max_pages will override the 'optimal database size' calculations, so setting it to a large positive value should get the desired effect.

See this answer.

share|improve this answer
It's in v4. change blames 30fcd9794eb2 2010-01-15 "part10", bugging 520165 targets mozilla1.9.3a1 refs Places async expiration. closest thing I found in bookmarks is GECKO193a3_20100315_RELBRANCH which was tagged with FIREFOX_4_0b11_RELEASE since 2011-02-03. I confirm 4.0b11 has this logic. – n611x007 Nov 4 at 9:11
so do you think places.history.expiration.max_pages (1) is more effective than places.history.expiration.transient_current_max_pages (2) that I've already set in OP? why? specifically what links const PREF_MAX_URIS = "max_pages"; to (1), but avoids (2)? I shall either confirm that (1) and PEX__loadprefs() is effective or confirm that if I shrink free space to 0, history remains with (1) set but goes with (1) unset. – n611x007 Nov 4 at 9:18
Good lord that's a terse comment °~° @n611x007: what links PREF_MAX_URIS to (1) is PREF_BRANCH = "places.history.expiration.". max_pages is fetched relative to the .exipration branch — see line 461 and line 760, – Cauterite Nov 4 at 9:56
I have reason to believe that setting transient_current_max_pages has no effect on history expiration. nsPlacesExpiration.js never actually reads it, only writes to it as a means of exposing the current history limit for other components to read. places.history.expiration.max_pages is what actually controls expiration. – Cauterite Nov 4 at 9:59

I had the same issue and I discovered a hacky way which you can read about here:

The tl;dr version is, use mozilla.cfg to lock the variable places.history.expiration.transient_current_max_pages to 2147483647 (the largest value accepted). The issue is that Firefox will change that setting automatically unless you lock it.

Note that mozilla.cfg does not work in Portable Firefox, so in such a situation I recommend using Portable Pale Moon instead (which does work with mozilla.cfg)

You can find info on using mozilla.cfg here:

This technically doesn't set it to keep history forever, but it'll retain a heck of a lot of entries. I currently have history going back 18 months now and my places.sqlite file (which retains the history) is over 150 MB (6 months ago it was about 100 MB, so for me I add 50MB every 6 months). Note that, with such large sizes, an SSD is HIGHLY recommended. If you don't have one then consider using a ramdisk + symbolic links instead (a ramdisk that saves data at timed intervals or at shutdown).

Also, it may be a good idea to make backups of your history file in case it borks out or something. Then again, it's a good idea to make entire hard drive backups as well...

share|improve this answer

In the palemoon forum from user341084's answer, there was a link to expire-history-by-days add-on - which has an option to disable expiration completely (or define expiration period).

share|improve this answer
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link answers can become invalid if the linked page changes. – CharlieRB Jan 9 at 20:40
I agree - but the link is not to a solution but to a plugin, and the name of the link is the name od the add-on, so there is nothing else i could put here. – chukko Jan 10 at 21:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.