Firefox Tips

From trapsink.com
Jump to: navigation, search


General

The SQLite Manager extension is a must-have for tweaking your sqlite files from within Firefox.


History Cleaning

Firefox’s data file places.sqlite stores multiple sets of data (bookmarks, favicons, etc.) but usually the large size comes from your browsing history. Open up a new tab and type “about:config” to get into the editor, then add/set these as desired/needed – you may need to rightmouse->New some of them:

browser.history_expire_days         [integer]  30
browser.history_expire_days.mirror  [integer]  30
browser.history_expire_days_min     [integer]  15
browser.history_expire_sites        [integer]  4000
browser.history_expire_visits       [integer]  2000

For those that like editing prefs.js by hand just drop these in:

user_pref("browser.history_expire_days", 30);
user_pref("browser.history_expire_days.mirror", 30);
user_pref("browser.history_expire_days_min", 15);
user_pref("browser.history_expire_sites", 4000);
user_pref("browser.history_expire_visits", 2000);

Firefox doesn’t vacuum (compress out extra unused space) from the data files, so even if the data expires you still have a bunch of flotsam inside the places.sqlite file. Shut down Firefox, change to the Profile directory and flush it by hand - this example is 30 days:

cp -a places.sqlite places.sqlite.bak
MONTH=`python -c "import time; print int(time.time()-3600*24*30)*1000000"`
echo "DELETE FROM moz_historyvisits WHERE visit_date < $MONTH;" | sqlite3 places.sqlite
echo "VACUUM;" | sqlite3 places.sqlite

A nifty extension Place Maintenance can be used to help manage your History cleaning.


SSL Exceptions

Set this preference to automatically expand the section that adds the Add Exception button to the SSL warning page, saves one annoying click:

about:config
browser.xul.error_pages.expert_bad_cert = true


DOM Storage

The file webappssstore.sqlite is used to store DOM information that collects cruft over time. Arguably it's for faster performance, however in real life it's a file collecting information about where you've visited and things those sites wish to save about you. First, disable storage:

about:config
dom.storage.enabled = false

Quit Firefox completely, delete the webappsstore.sqlite from your profile folder and start Firefox again - a new, empty file will be created however not actually used. Warning: some sites may not function correctly with this set to false, for example the Google Developers Console.


DNS

If there seem to be weird DNS pauses and stalls, try disabling IPv6 and prefetching; setting the cache expiration to 0 should also disable it:

about:config
network.dns.disableIPv6 = true
network.dns.disablePrefetch = true
network.dnsCacheExpiration = 0


Profile

Various items that can be cleaned out if running the latest FF release (use with caution):

# http://kb.mozillazine.org/Profile_folder_-_Firefox
cd /path/to/firefox/profile
rm -r addons.sqlite compreg.dat components.ini cookies.txt defaults.ini \
  downloads.rdf downloads.sqlite experiments.json extensions.cache \
  extensions.rdf extensions.sqlite formhistory.dat history.dat hostperm.1 \
  localstore.rdf marionette.log search.rdf search.sqlite signons.sqlite \
  signons.txt signons2.txt signons3.txt

# Old extensions data no longer installed

# xmarks
rm -r xmarks*

# ublock
rm -r extension-data/ublock*

# vimperator
rm -r liberatorCache/


References