How To Future-Proof Your Firefox ExtensionsHow To Future-Proof Your Firefox Extensions

Want to test-drive the Firefox 1.5 beta and bring most of your favorite extensions along for the ride? We'll show you how to make your brand new Firefox update less picky about installing extensions -- and explain why doing so isn't always a good idea.

Matthew McKenzie, Contributor

September 29, 2005

5 Min Read
information logo in a gray background | information

Revive Those XPIs
The beauty of Firefox, of course, is more than just skin deep: Power users can and do tweak the product in an infinite number of ways. If you're willing to overrule Mozilla's play-it-safe default extension settings, chances are you can get most of your disabled extensions working in a matter of minutes. In fact, there are several ways to do this, depending on how many extensions are involved and how you want to use them.

A word of warning: I'm about to discuss hacks that could break your extensions, trash your Firefox profile, get you fired, and for all I know, turn you into a Cocker Spaniel. Back up your Firefox profile, and maybe put down some newspapers on the floor, before you try any of them. If you don't back up your profile and Something Really Bad happens, then you've just learned a valuable lesson -- so quit whining.

Also, before you hack, get the facts. (No, not that ""Get the Facts.") Firefox lead developer Ben Goodger has published a tutorial on ""Extension Versioning, Update and Compatibility," which is about as good an overview on the subject as you'll ever get. Learn how and why the system works, and then you can break it with a sense of panache.

Method One: Single-Hack
Goodger also spells out the first and easiest way to install extensions with incompatible maxVersion values: Temporarily change the value of app.extension.version in Firefox, using the about:config interface. As Goodger notes, you should always reset the true value when you're done installing; doing so won't reverse your changes (Firefox only checks once and then leaves the extension in peace), and it might prevent a version-control train wreck in the future

While this is the easiest way to activate extensions as you install them for the first time, it won't reactivate your current extensions after an updated version of Firefox has already deactivated them. To deal with those, try Method Two (for individual extensions) or Method Three (for the whole bunch) below.

Also: After you've made a mess of things (which is the only way to learn anything useful, right?), Goodger includes instructions on how to start Firefox in Safe Mode on each supported platform, so that you can yank out a rogue extension even if it's running amok on your system. Sometimes, Safe Mode will save your bacon, and sometimes it won't -- so always back up your profile or be prepared to start over with a new one.

Method Two: Hack-N-Share
If you're like me, people may assume that you know something about computers, just because you spend so much time talking to them. Don't disappoint: If you modify maxVersion in the extension itself, you can share the .xpi file with your friends and amaze them with your godlike mastery of Firefox's mysteries.

(You could also use their PCs as guinea pigs to test extensions that may or may not lobotomize your profile when tampered with in this manner. That's entirely up to you, and I did not just suggest this.)

Either way, you start with the extension's .xpi file: basically a fancy-pants .zip file, which you can open using the same kinds of tools. Extract the resource.rdf file, and then with a text editor such as Notepad (do NOT use Word, Wordpad, etc. for this job), change the value between <em:maxVersion> and </em:maxVersion> so that it's equal to or greater than your Firefox version number.

How high should you make this value? Anything between 1.5 and 999 will work; while using the latter number may be mildly amusing, using the former will prevent your distant descendants from wondering what on earth "Blinky" is and why it just crashed their brand new hyperspace quantum computer running Mac OS XC.

Method Three: Mass-Hack
Finally, there's a workaround that will get all of your previously installed, disabled extensions working within minutes, at the push of a button. If you've got, say, 30 disabled extensions to revive, you're inherently lazy, you've come to the right place.

Actually, this isn't even a proper workaround; instead, you'll rely on yet another extension, Nightly Tester Tools, to do the dirty work for you. In this case, I used version 0.7.7 of Nightly Tester Tools, available at The Extensions Mirror, a site that anyone who enjoys coloring outside of the lines with Firefox should check out. I discovered this maxVersion hack, as well as the links to Bugzilla entries I mentioned before, courtesy of an Extensions Mirror forums tutorial on the topic.

(Note: Although the version hosted at addons.mozilla.org the last time I checked was an older build (0.6.5), I believe it, too, now works with Firefox 1.5.)

Once you install Nightly Tester Tools, re-open your extensions manager, right-click on each disabled extension, and choose the "make compatible" option. You can reactivate multiple extensions with a single restart, although you'll obviously have a much harder time identifying the culprit if something goes wrong. I re-activated my extensions one at a time and quickly checked them before moving on; when one didn't work properly, I pulled it back out immediately.

So, how many of my 30 comatose extensions did I revive? The numbers were encouraging: 27 of them passed first muster, which in this case meant that I could view an extension's options and that menu bars or context menu items appeared where they should have. Also, when I actually spent time working with each extension, several that looked OK at first turned out to be unstable -- they got the "Ol' Yeller treatment" a day or two later.

In the end, I got at least 20 of those 30 extensions to work (a couple are still in the "maybe" category), without mangling either Firefox 1.5 or my profile. Under the circumstances, I'd say that's a good day's work for any hard-core Firefox extensions fan.

Matt McKenzie is the editor of Linux Pipeline. He's still waiting for Archie and Gopher to make their big comebacks.

Read more about:

20052005
Never Miss a Beat: Get a snapshot of the issues affecting the IT industry straight to your inbox.

You May Also Like


More Insights