Posts Tagged ‘Firefox’

Reignite your Firefox [Update]

Saturday, May 2nd, 2009

I’ve just read a great tip on Firefox performance by Nick Anderson that I wanted to share with you: Newer versions of Firefox store all its data in so-called SQLite databases. SQLite is an ACID compliant relational database engine that consists of one flat file and is meant for storing data of single-user applications. The problem with these SQLite database files is that they get cluttered over time. Luckily, there’s a statement to clean up an SQLite database: The VACUUM statement. Just close all Firefox instances, backup your profile and run the following shell code:

  1. for i in ~/.mozilla/firefox/*/*.sqlite; do sqlite3 $i VACUUM;done;

VoilĂ . Depending on how long you use your profile, the performance increase will be really significant. And don’t think of filing a bug report. There are already plenty of it.

Update: Jeremy Orem recently posted on how you can clean your SQLite databases without shutting down the browser:

  1. Select Error Console from the Tools menu.
  2. Paste the following in the Code text-box:
    Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsPIPlacesDatabase).DBConnection.executeSimpleSQL("VACUUM")
  3. Press Enter

The user interface may freeze for a second while the vacuuming takes place.

Quick and dirty: Disable web cache in Firefox 3.5 (Shiretoko)

Thursday, April 16th, 2009

It’s sometimes necessary to disable your web browser’s cache, especially, if you’re doing web development. If you’re using a legacy Firefox build (e.g. Firefox prior to 3.5), you could use the excellent Web Developer Toolbar by Chris Pederik to do this (on the Disable menu, select Disable caching). But if you’re living on the cutting edge of things and use a nightly build or a beta build of the current Firefox 3.5 (code name: Shiretoko) like I do, you can’t use the extension, because it is not compatible with nightly builds or recent beta builds (as of this writing).

Thus, a quick and dirty approach: First, type about:config into the URL bar. You’ll see a warning, that advises you to be careful. Be careful. After carefully dismissing the warning, enter network.http.use-cache into the filter bar. You should now see the preference of the same name. Double click on the value to change its value. If the value is set to false, the cache is disabled. If the value is set to true, which is the default, the cache is enabled. Despite the name, caching of sites using the https protocol will be disabled, too. And don’t forget to re-enable the cache after you’re done with whatever you wanted to do.