The Art & Science Of JavaScript122
JavaScript on the fly. With its ability to analyze HTTP traffic, Firebug is also a suitable tool for the
quick and dirty exploration of web servicesan alternative to using client applications such as
telnet and curl.
Firebug can also help you discover how other peoples JavaScript applications work. Exploring
other apps can be a powerful educational experience and, after all, one of the reasons why a technique
such as Ajax flourished so quickly was the ease with which the innards of an Ajax application
could be examined. If I was going to write a Google Maps mashup like the one in Chapter 7, for in-
stance, the first thing Id do would be to find one or two sites that already use Google Maps, and
spend a few minutes dissecting them with Firebug. The ability to dissect an existing site offers more
direct benefits, tooit can speed up the development process for applications that dont run in a
browser. So, for example, it can hasten the development of a desktop application that interacts with
another sites API, such as a command line scraper or a site-specific browser plugin.
Installing and Running Firebug
Okay, so Ive convinced you that you need Firebug (and the Firefox browser in which it runs). Go
ahead and install it if you havent alreadythe process is fairly straightforward.
Installing Firefox and Firebug
On the remote chance that you dont have Firefox installed, nows the time to download the latest
version from http://getfirefox.com/. Like Firebug, Firefox is an open source product that can be
downloaded free of charge.
Once youve installed Firefox, you can install Firebug. If youve never installed a plugin before,
fear notthe process is quick, if somewhat convoluted. Here are the steps that work for Firefox 2.0;
other versions may vary slightly.
1. Launch Firefox if its not already running.
2. Type http://getfirebug.com/ in the address bar, and press Enter.
3. When the Firebug homepage has finished loading, click the Install Firebug link. At the time of
writing, the latest release was version 1.0, and the Firebug download link was a big orange button.
You should see a yellow warning bar appear at the top of the browser, like the one shown in
Figure 4.1. Click on the Edit Options button, and click Allow to add the getfirebug.com domain
to your list of approved sites.
4. Click the Install Firebug button again.
5. A popup window will appear to ask you to confirm the installation; accept the installation request.
Hooray! Firebug is now installed. Unfortunately, you cant use it yet.

Get The Art & Science of JavaScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.