Firefox Essentials: Get To Know Your Profile

Even if you're not much of a techie, it's a good idea to know where to find your Firefox profile, what types of files you'll find there, and how you

February 22, 2006

14 Min Read
NetworkComputing logo in a gray background | NetworkComputing

Editor's note: This is the second installment of our "Firefox Essentials" series. Don't miss our other segments on must-have Firefox extensions and troubleshooting Firefox.

The longer you use Firefox, the more little things you'll collect that make your online life easier: bookmarks (known as "Favorites" to recovering Internet Explorer users), a History file listing sites you've visited, saved login names and passwords, and so on. Firefox puts almost all of this information, along with your extensions, browser plug-ins, cache and configuration files, in one place: your profile folder.

Get To Know Your Profile

•  Meet Your Profile•  Delve Inside

•  Back It Up•  Restore It•  The Piecemeal Approach•  Image Gallery

Even if you're not much of a techie, it's a good idea to know where to find your profile, what types of files you'll find there, and how you can protect them against mishaps.

Meet Your Profile
Depending on your operating system, you'll find a copy of your Firefox profile folder in different places:

Mac OS X: ~/Library/Application Support/Firefox/Profiles/Linux: ~/.mozilla/firefox/

Windows XP/2000: C:Documents and Settings[your user name]Application DataMozillaFirefoxProfiles

(Note: You may not see the Application Data folder where it's supposed to be. That's because Windows hides this folder, and many others, by default. To see it, click Tools on your Windows Explorer menu, click Folder Options, select the View tab, click the "Show hidden files and folders" radio button, and click OK.)

One thing you'll notice right away is the name on your profile folder: a unique, random set of eight letters and/or numbers. If it looks like gibberish, that's because it is gibberish: Firefox creates a random-generated name for this folder to keep viruses, trojans, and other hostile software away from your profile data.


Delve Inside
So much for the outside; what's on the inside of your profile folder? Among other things, you'll find files dealing with:

Get To Know Your Profile

•  Meet Your Profile•  Delve Inside•  Back It Up•  Restore It•  The Piecemeal Approach

•  Image Gallery

  • Where you've been:  Besides your bookmarks.html and history.dat files, you'll find the data required to auto-fill online forms (formhistory.dat); your saved site login names (signons.txt), passwords (key.db), and security certificates (cert8.db); and a cookie.txt file that helps Web sites to "remember" you from visit to visit.

  • What you do:  When you install one of the hundreds of small Firefox helper apps known as extensions, it lands in a separate folder within your profile -- this allows every user on a system to keep his or her own set of extensions, rather than sharing a single, common set. The same is true of Firefox search-engine plugins, which also get their own profile folder.

  • What you see:  You might already know about the Firefox prefs.js file, which provides access to a variety of under-the-hood configuration settings (to see the same settings, you can also type about:config in the browser's address box); and the user.js file, which allows power users to customize things like menu items, typefaces, and font sizes.

    In the Chrome folder, you'll find two more text files (complete with examples and sample scripts) where you can customize the Firefox toolbars, icons, buttons, and other "look and feel" elements.

Other files may also appear in your profile folder, depending mostly upon what types of extensions you install; as I'll discuss shortly, these obscure and usually harmless files can, when corrupted or misconfigured, wreak havoc over your profile -- sometimes to the point of rendering it unusable.

Unless you're a developer or a power user, the best way to "manage" your profile data is to leave it alone. When you install and start up Firefox for the first time, it automatically creates a default profile for you; if Firefox finds more than one user account on your PC, then each user gets his or her own default profile when they start up the browser for the first time. If you delete or move your profile, Firefox will simply create a new one -- unless you tell it otherwise.

As a rule, one profile is all you need: Only software developers and hard-core power users bother to create or manage multiple profiles for the same version of Firefox on the same system.


Back It Up
It may seem risky to keep all of your eggs, as it were, in one basket. Firefox was designed to be user-friendly and easy to customize, however, and the data in your profile folder serves both purposes extremely well. Yet it's also true that when things go wrong (and they WILL go wrong), it's far too easy to lose your entire online identity in a puff of virtual smoke. For some people, losing their profile data and starting over from scratch is no big deal; for others, it's an absolute disaster.

Get To Know Your Profile

•  Meet Your Profile•  Delve Inside•  Back It Up•  Restore It•  The Piecemeal Approach•  Image Gallery

Fortunately, it's a completely preventable disaster: A backed-up copy of your profile provides a quick and easy insurance policy in case your profile data is damaged or deleted.This happens more often than you might expect, and it's not always a bad thing: I learned quite a bit about Firefox by playing with, tweaking -- and more than once, mangling beyond repair -- the various text-based configuration files located in the profile folder. Also, if you get into the habit of installing multiple Firefox extensions, you'll learn that it's often easier to yank a misbehaving profile than it is to track down the source of the problem, provided you have a backup ready and waiting.

Simply put, if you've got a backup for your profile tucked away somewhere safe, you can do almost anything to Firefox and still walk away without a scratch at the end of the day. What a deal.

Before you back up your profile folder, however, be sure to take care of two other tasks:

1. Clear your cache. Go to Tools > Options in the main Firefox menu, select the Privacy icon, and click the Clear Cache Now button in the Cache tab (a move that could cut the total size of your profile folder in half or more).



2. Shut down Firefox completely. This means opening the Windows Task Manager -- or its equivalent in OS X or Linux -- and ending any rogue firefox.exe processes that you find. To open the Task Manager in Windows XP, press the Ctrl+ Alt + Delete keys and click the Task List button, or right-click an empty space on the Taskbar and select Task Manager.Next, click the top of the Image Name column to list the running processes in alphabetical order, and if you see firefox.exe in the list, select it and click the End Process button. In this case, ignore the dire-sounding confirmation warning, and click Yes to finish the job.



You know the drill from here: Copy your entire Profiles folder to another folder on your hard drive, a different hard drive, a CD, or wherever you care to stash it for safekeeping:

1. Select your Profiles folder and choose Edit > Copy To Folder from the Windows Explorer menu.

2. In the Copy Items window that pops up, navigate to your backup location and click the Copy button.


Keep Backing It Up

Next, you'll need to decide how often to create a fresh backup of your profile. Every day? Every time you install a new extension? Every full moon? Ultimately, that depends on what you're doing -- or, more to the point, what you're planning to do next. If you haven't used Firefox in two weeks, and you just logged on to check your e-mail for five minutes, then making another backup is about as useful as watching paint dry.

Get To Know Your Profile

•  Meet Your Profile

•  Delve Inside•  Back It Up•  Restore It•  The Piecemeal Approach•  Image Gallery

On the other hand, if you just saved dozens of bookmarks for obscure, one-of-a-kind Web sites as part of a marathon online research session, and the next item on your to-do list says "install a few dozen brand-new extensions," Murphy's Law is sure to make you pay dearly if you blow off your backup.

There's a lot of ground to cover between those two extremes, of course, but a little common sense will take you a long way.Fixing The 'Fox: Restoring Your Backup Profile

So, you've got a problem: Firefox isn't working right, or maybe it's not working at all. Is it time to blow away your current profile and reach for your backup?

The truth is, you can often solve Firefox problems by replacing a single corrupt configuration file or disabling a single extension. This is a good thing: Every time you avoid a full-scale restore operation, you avoid the risk of losing data to an old or damaged backup. (I'll talk more about troubleshooting Firefox in the next installment of our "Firefox Essentials" series.)

If you're sure it's time to start over, however, here's what you'll need to do:

1. Shut down Firefox if it's still running. Even if you don't see a browser window open, double-check your system's list of running processes, as outlined on the previous page. If you catch firefox.exe still running, make sure you shut it down before proceeding.

2. Find your current Profiles folder (see the previous page for a list of locations for each operating system, and what to do if your Windows system files are hidden).3. Open another window showing your backed-up Profiles folder and choose Edit > Copy To Folder from the Windows Explorer menu. In the Copy Items window that pops up, navigate to your current Profiles folder location and click the Copy button to replace your current profile with the backup.

4. Marvel at just how easy that was.

Backup And Restoration Made Easier?

Wouldn't it be nice to forget all this stuff, and just rely on some clever developer to write a Firefox extension to take care of it? Thanks to a utility called MozBackup (which only works on Windows), you can indeed back up and restore your profile data -- including bookmarks, e-mail, contacts, history, extensions, cache data, personal data, and configuration settings -- with a few mouse-clicks.

At least, I think you can -- I haven't actually tried MozBackup, and I can't vouch that it works as advertised. The question is: Should you rely on a third-party app to take care of your profile housekeeping? Honestly, I can't recommend it. If you know even the basics of fie management on a PC, backing up your Firefox profile is about as hard as tying your shoes. (An extension that performs automated backups at scheduled intervals -- now that would be handy. But to the best of my knowledge, no such extension exists.)

There is, however, a related Firefox extension that I do recommend: MR Tech Local Install. Among many other helpful features, it saves an archived copy of each extension XPI file on your PC, so that if you have to nuke your profile folder, you can reinstall your extensions from local copies -- a huge timesaver if you use more than a few at a time.


One File At A Time: The Piecemeal Approach
Not ready to blow your entire profile away? You also have the option to save key files from your current profile before you delete it, and then to copy them into either a brand-new profile or your backup.

Get To Know Your Profile

•  Meet Your Profile•  Delve Inside•  Back It Up

•  Restore It•  The Piecemeal Approach•  Image Gallery

If your profile backup is even a few days old, you may want to hang onto certain files that have changed in the meantime. Most people consider their bookmarks.html and history.dat files most important -- fortunately, these files rarely cause serious problems in Firefox, and it's almost always safe to transfer them between your old and new profiles.If you'd like to move a more complete subset of your profile data, use the following list as a starting point. If you're able to move all of these files to your new profile without causing any problems, you may not even notice the difference:

bookmarks.html

Bookmarks

cert8.db

Security certificates

cookies.txt

Cookies

formhistory.dat

Form history

key3.db and signons.txt

Saved passwords

history.dat

Browsing history

hostperm.1

Cookie, image, and extension install permissions

mimeTypes.rdf

Actions to perform on downloaded files

Of course, if you use extensions or customized config files, you definitely will notice their absence. Unfortunately, if you have a problem, there's a good chance it's lurking in one of these files -- bringing them along for the ride just might put you back where you started.

I do not recommend moving the prefs.js file separately from a full profile folder backup. Because many extensions manipulate the settings in this file, moving it without moving your extensions might cause more problems than it solves.A final note: You can also, if the mood strikes you, move your profile to another location on your PC; point Firefox toward a completely different profile; or play various other, increasingly complicated games with as many profiles as you care to juggle. If you'd like to know more, the Mozillazine tutorial Moving Your Profile Folder will acquaint you with the tip of this profile-management iceberg.

More Firefox Essentials:
Firefox Essentials: 10 Must-Have Extensions

Firefox Essentials: Get To Know Your Profile
Firefox Essentials: Fixing The Fox

Matt McKenzie is the editor of Linux Pipeline. Over the years, he has broken more PC hardware than most people will ever use -- and he's not done yet. Contact him at [email protected] with questions, comments, complaints, or cash.

Read more about:

2006
SUBSCRIBE TO OUR NEWSLETTER
Stay informed! Sign up to get expert advice and insight delivered direct to your inbox

You May Also Like


More Insights