Monthly archives for June 2008

Published on June 18, 2008

Firefox 3 was released just yesterday, bringing a wealth of new features to be excited about. From faster launch time and better memory management to interface polish and glitz, and over 8 million downloads already, Firefox 3.0 is a gem among modern web browsers.

For those that do web development, though, the 3.0 release means another round of website compatibility testing in both the earlier release and now the current one. For the most part, this isn’t a new challenge, but Firefox can be a bit peculiar: Upon launching Firefox, it checks to see if another instance is already running, and if found, brings up a new browser window of the currently running version. So, launching Firefox 2.0 while 3.0 is running results in two 2.0 windows, and vice versa for 3.0. This effectively stops the casual user from simultaneously running both Firefox 2.0 and 3.0 side by side. As an added side effect, when you completely shut down Firefox and launch a different major version, your profile information can get skewed, resulting in sometimes strange bookmark appearance and lots of checking for updates to installed add-ons. With a little tweaking, though, Firefox 2.0 and 3.0 can be convinced to run independently, each with their own bookmarks and add-ons.

Mac OS X Instructions

Running two versions of Firefox under Mac OS X couldn’t be simpler. The freeware application MultiFirefox takes all the guesswork out of the process by automatically detecting Firefox versions in your main Applications folder and presenting you with a list from which to choose the Firefox versions you’d like to launch. Complete with self-updating (thanks to the ubiquitous Sparkle framework), MultiFirefox is the easiest way to pull off this multi-browser stunt.

Windows Instructions

If you already have Firefox (2.0 or 3.0) installed, it’s important to back up your crucial information before getting started. Navigate to C:\Documents and Settings\YourName\Application Data\Mozilla\Firefox and copy your “Profiles” folder somewhere safe.

Once backed up, download Firefox 2 and/or Firefox 3, depending on what you already have installed. Launch each installer and begin setting up Firefox, but make sure to choose Custom settings. When asked for a place to install Firefox, change the path(s) to C:\Program Files\Mozilla Firefox 3\ (or ...\Mozilla Firefox 2), instead of just “Mozilla Firefox”. In doing so, you’ll place Firefox 2 at C:\Program Files\Mozilla Firefox 2\, and Firefox 3 at C:\Program Files\Mozilla Firefox 3\. Both versions of Firefox should now be in separate folders. (If you already have one version of Firefox installed at C:\Program Files\Mozilla Firefox\, you may choose to leave that where it is and just install the other version in a separate folder, however you’ll have to make a note of which is where, and modify the following instructions accordingly.)

Create a new shortcut to Firefox 2.0 by right-mouse-button-dragging C:\Program Files\Mozilla Firefox 2\firefox.exe to your Desktop (for now), and choosing “Create Shortcuts Here”. Name the shortcut “Firefox 2″. Repeat for Firefox 3, changing “2″ to “3″ where appropriate.

You’re almost there, but now we have to tell Firefox to keep the two instances separate. Open the Properties window for the Firefox 3 shortcut, and add -ProfileManager (space key, minus sign, ProfileManager) to the end of the string of text in the Target field. Click OK, then run that same shortcut to bring up Firefox’s Profile Manager. Rename the existing “default” profile to “firefox3″, and also create a new “firefox2″ profile:

Once profiles are set, exit Firefox completely. With two profiles in place, each version of Firefox can have its own bookmarks, extensions, and other settings, without interfering with each other. Open up the properties windows for both the Firefox 2 and Firefox 3 shortcuts you made. Remove the -ProfileManager addition from the Firefox 3 shortcut Target, replacing it with -no-remote -p firefox3 (space key, minus sign, no-remote, space key, minus sign, ‘p’ key, space key, firefox3). Add the same to the Firefox 2 shortcut, again changing the 3 to a 2. Both shortcuts should now have the -no-remote option set, as well as -p followed by the designated profile that matches that Firefox’s version. In short, Firefox 3 gets the firefox3 profile, and Firefox 2 gets the firefox2 profile, seen below:

Click OK on both shortcuts to confirm the changes, and finally double-click each to run Firefox 2 and 3 at the same time!

Also, don’t miss LifeHacker’s Power User’s Guide to Firefox 3 for some excellent 3.0 tips and tricks, as well as ArsTechnica’s briefing of what’s to come in Firefox 3.1.

Update: Here’s another excellent tutorial on running Firefox 2 and 3 at the same time, including notes on the -no-remote switch and how it can make Firefox claim it’s “already running but not responding.” That firefox.exe switch appears to be a bit of a double-edged sword.

Published on June 5, 2008

In woodworking, metalworking, and other crafts where exact reproduction of a given piece is crucial, a common tool is a “jig.” A jig is effectively a template for creating a copy. For example, when a door key is duplicated, the cutting machine uses the existing key as a jig, tracing the hills and valleys on its edge to produce an identical version.

Along the same line, when developing a web application or just a simple page, HTML forms require that data be typed in and submitted. This process will repeat as the server-side code is refined, and typing the same data over and over gets old as soon as the second iteration. “Don’t Repeat Yourself”, or “DRY”, is a common philosophy for writing better code, and should extend to testing your forms, as well. Save your typing for code.

Form Jig is a small Firefox extension for replicating HTML form data and server-side code. To use it, fill out a form on a page, click the red Capture button in your Firefox status bar, then submit the form. Upon returning for further testing, click the green Replay triangle to populate the form just as you left it. Form data is kept around until the current Firefox window is closed, and can be used between tabs. Install Form Jig from Mozilla Addons.

Suggestions are welcomed, and bug reports will be attended to.

Update: Version 1.0.1 fixes a bug related to checkboxes and radio buttons. The updated plugin should appear on addons.mozilla.org shortly (linked via the above button), but still hasn’t passed Mozilla’s “nomination” for public consumption.