Firefox’s History Setting

I use the history in my browser often, to find sites I’ve visited. It’s precisely because I use it so often that it annoys me when it grows large. Especially as I moved my site around, I’m seeing lots of pages that no longer exist pop up in the history when I go to visit a site. I’d like to purge the old ones.

Tools -> Options -> Privacy has a setting, “Keep my history for at least __ days,” but note that “at least.” Mine’s gone way past the 7 days I have set.

By entering about:config, I discovered something: that’s called browser.history_expire_days_min, which I’d set to 7. But there’s also a browser.history_expire_days, still at 180. (Along with a browser.history_expire_days.mirror)

It turns out that the _min tells Firefox when it can delete an entry, but it won’t unless it’s short on space. Firefox 3 apparently makes this automatic, but wasn’t designed for people with a severe case of OCD who want things to age out after a while.

Setting history_expire_days (and history_expire_days.mirror) to 14 solved the problem: now things get saved for at least 7 days, but not to exceed 14. No more 6-month-old history entries!

Edit: A lot of people are searching for history_expire_days.mirror, which is fairly cryptic. This portion of the source code was indexed by Google*, and defines browser.history_expire_days.mirror as “a preference whose value mirrors that of browser.history_expire_days, to make the “days of history” checkbox easier to code.” So just set it to the same as history_expire_days if you’re changing it!

* It’s open source, so it’s not like it’s hard to find the source code.

10 thoughts on “Firefox’s History Setting

  1. Pingback: Matt’s Blog » Blog Archive » Updated Statistics

  2. Thanks for posting this. I used 3 days instead of 7. Firefox was slowing down whenever I typed something in the address bar.

    I also changed the following from 4000 (default) to 400:

    browser.history_expire_sites

    Everything is running a lot smoother on this old laptop.

  3. Thank you for this! I thought nobody else would be as crazy as I am and actually not want to see memory that old. Glad to know I’m not alone, and very glad to know how to fix it. 🙂

  4. Well I am glad to have found this.

    Now can someone please tell me on how to get to tyhe code so i can change this??

    I for one have problems with ANY history being saved anywhere in my computer, ESPECIALLY if it has something to do with Google.

    I can also be reached at: yackarony@yahoo.com

  5. You’ve got to be kidding me! Lols.
    You don’t think Mozilla knows how their browser works? These guys are very clever. I’ll tell you something. The browser history is mirrored and stored elsewhere. The default for that mirror is not 180, it goes to that number each and every time you use the “private browser” feature. The reason? Information gathering has become quite an industry. How do you think Mozilla supports itself? If it didn’t sell more of your information they wouldn’t make as much money. They really fool a lot of people with this crap. Think about it. Why wouldn’t they more clear about this? Set your history to 7 days just to discover that’s a minimum. So 180 days is stored because you went “private”. Don’t believe me? Test it for yourself. It’s cryptic for a reason and trust me it’s not left over code just lying around.

  6. Oh… and another thing. It also stores your history from Internet Explorer too. Isn’t that nifty?

  7. Can somebody tell me the name of the Firefox / Mozilla / Iceweasel history file, specifically on a Linux / Debian system.

    I’ve been googling and searching my system with no luck so far.

  8. Randy: It’s a SQlite database stored in your Mozilla profile: http://www.forensicswiki.org/wiki/Mozilla_Firefox_3_History_File_Format

    places.sqlite

    Note that Firefox appears to lock the database files when it’s in use, so make sure Firefox is dead before opening/manipulating.

    (crypticone: If Mozilla has been engaged in this massive conspiracy for years, how come no one has ever noticed it in the middle of an open-source project? And why wouldn’t they just send your history to their tracking satellites/mind control devices instead of saving it to your hard drive?)

  9. THANK YOU for posting this solution. I had actually figured it out by tinkering in the about:config file on my own, but I could have saved a lot of time by coming here.

Leave a Reply

Your email address will not be published. Required fields are marked *