Firefox's browser history is more searchable than most users realize, and there are several ways to manage, backup, and restore it. Here's the complete guide.
Accessing and Searching History
Quick access:
- Address bar: type part of a URL or page title — history suggestions appear automatically
- Ctrl+H: Opens History sidebar
- Library window: Ctrl+Shift+H opens full history in a new panel
Advanced history search:
In the Library (Ctrl+Shift+H):
- Search box at top: search by title, URL, or tags
- Filter by date: "Today", "Last 7 Days", "This Month", "Older"
- Sort by: Last Visited, Most Visited, Date, Title, URL
Address bar history (the most useful daily feature):
Just start typing. Firefox shows history matches as you type, ranked by:
- Frequency (pages you visit more often rank higher)
- Recency (recently visited pages rank higher)
- Bookmark status (bookmarked pages get a boost)
Understanding Firefox's History Model
Firefox stores two types of history data:
Places database (places.sqlite in your profile):
- URLs visited
- Visit timestamps
- Visit count per URL
- Bookmark data (stored in same database)
- Search queries
Page metadata:
- Page titles
- Favicons (stored separately in
favicons.sqlite) - Frecency score (frequency + recency combined score)
The "Frecency" algorithm determines which history suggestions appear first. Pages you visit often and recently score highest.
History in about:config
places.history.enabled = true/false (completely disable/enable history)
browser.history_expire_days = 90 (default: 90 days of history kept)
browser.history_expire_sites = 40000 (max number of URLs to remember)
Increase history retention:
By default, Firefox keeps 90 days of history and up to 40,000 URLs. For power users who want longer history:
browser.history_expire_days = 365
browser.history_expire_sites = 100000
Clearing History
Clear immediately (partial):
History menu → Clear Recent History
Options: Last Hour, Last 2 Hours, Last 4 Hours, Today, Everything
Choose which data to clear: Browsing & Download History, Form & Search History, Active Logins, Cookies, Cache, Offline Website Data
Clear on close:
Settings → Privacy & Security → History → Firefox will: Use custom settings → check "Clear history when Firefox closes"
Configure what gets cleared on close: Click "Settings..." next to the clear history option.
Clear specific sites:
Ctrl+H → right-click a site → "Forget About This Site"
This removes all history entries for that domain.
The Nuclear option:
Settings → Privacy → Clear Data → check "Browsing History" → Clear
Forgetting Individual Pages
When you want to remove a specific embarrassing URL from history:
- Type the URL or its title in address bar
- When the history suggestion appears, hover over it
- Press Delete (or the X button) to remove just that entry
- The URL is removed from history and won't appear in suggestions
Or in Library (Ctrl+Shift+H):
- Find the entry
- Right-click → "Forget About This Site" (removes all visits from that domain)
- Or: Delete key on keyboard to remove just that entry
History and Private Browsing
Private windows don't save history to your main profile. After closing a private window, all history from that session is gone.
A note on what private mode doesn't do: Private browsing prevents local history storage. Your ISP, employer network, VPN provider, and the websites themselves still see your traffic. "Private" means private on your device.
Semi-private browsing: Open a new container tab (Firefox Multi-Account Containers). Container tabs save history to your profile but have isolated cookies. If you want history tracking but cookie isolation, this is the right tool.
Exporting History
Firefox doesn't have a one-click history export. Options:
Method 1: SQLite query
Your history is in ~/.mozilla/firefox/PROFILENAME/places.sqlite.
import sqlite3
import shutil
# Copy first (Firefox locks the file while running)
shutil.copy('/path/to/places.sqlite', '/tmp/places_copy.sqlite')
conn = sqlite3.connect('/tmp/places_copy.sqlite')
cursor = conn.execute("""
SELECT url, title,
datetime(last_visit_date/1000000, 'unixepoch', 'localtime') as last_visit,
visit_count
FROM moz_places
WHERE last_visit_date IS NOT NULL
ORDER BY last_visit_date DESC
""")
import csv
with open('/tmp/firefox_history.csv', 'w', newline='') as f:
writer = csv.writer(f)
writer.writerow(['URL', 'Title', 'Last Visit', 'Visit Count'])
writer.writerows(cursor.fetchall())
Method 2: History extension
Several Firefox extensions can export history to CSV or JSON.
What about import?
Firefox doesn't support importing history from an external file. You can import bookmarks (from HTML), but not history. Historical visits aren't importable.
History's Relationship to Address Bar Suggestions
The address bar suggestions algorithm is called "Frecency" (frequency + recency):
- Higher visit count → higher score
- More recent visit → higher score
- Bookmark bonus → extra score
- Title match vs URL match → slightly different weights
Why this matters: Pages you visit once don't persist in suggestions long. Pages you visit often stay high in the ranking for months.
To boost a page: Visit it a few times. The algorithm will pick up on the frequency.
To suppress a page: Delete it from history (Ctrl+H, right-click → delete). Or forget that site.
History vs Sync
Firefox Sync syncs history across your devices. This means:
- Desktop browsing history appears on mobile
- Mobile browsing history appears on desktop
- History from multiple devices is merged
Privacy consideration: History sync is E2E encrypted (same as passwords). Mozilla can't read it. But if your Firefox Account is compromised, all your history from all devices is accessible to the attacker.
Disable history sync selectively:
Settings → Sync → Sync Settings → uncheck "History"
This keeps other sync (bookmarks, passwords) but stops history from syncing.
History and Containers
Firefox stores history regardless of which container the tab was in. The history entry doesn't record the container.
Implication: If you visit a site in the Work container, that URL appears in history just like any other visit. History doesn't provide container isolation.
If you want browsing history not recorded at all: use Private Browsing mode.
Frecency Score Debugging
Curious what frecency score a page has? In the DevTools console:
// This requires the PlacesUtils API, which is internal
// Not directly accessible from regular console
Alternatively: type the URL in address bar and see how prominently it appears. That's the practical measure of its frecency score.
Quick Summary
| Task | How To |
|---|---|
| Search history | Ctrl+H or just type in address bar |
| Delete one URL | Address bar suggestion → Delete/X |
| Forget a domain | Ctrl+H → right-click → Forget About This Site |
| Clear recent history | Ctrl+Shift+Delete |
| Export history | SQLite query on places.sqlite |
| Disable history | Settings → Privacy → History → Never remember history |
| Increase history retention | about:config → browser.history_expire_days |
Top comments (0)