Well, Firefox 2 beta 1 is out, and I’ve been trying it out. I used to run nightly builds back in the early days, but since 1.0 hit, I haven’t been willing to go below beta-level for my primary browser, so I haven’t really been following development of Firefox 2. (Let me just say I really like in-line spell checking!)

As a web developer, one of the new features that caught my eye is microsummaries. If the name weren’t already taken, “live bookmarks” would have been the perfect description.

Basically it retrieves info from the bookmarked page and updates the label on your bookmark. Examples given include the current price and remaining time for an auction, or current stock price, or weather data. The page author can describe what chunk of data to use, or you can write an installable “generator” that applies itself to some list of pages.

This is a pretty cool idea: basically a 1-item RSS feed, automatically generated from the current page. (The disadvantage is that the browser retrieves the full page and then extracts the data, whereas an RSS feed is already summarized.) Edit: Apparently it’s also possible to link to a 1-line text document instead.

So, being handed a new tool, I immediately started trying to come up with something to do with it.

And came up more-or-less empty.

There are only two areas on my site that I update regularly: Flash: Those Who Ride the Lightning and this blog—and both are more suited to the list of recent updates that you get with RSS or Atom than the latest-info-only that you get with a microsummary.

It might prove useful for server monitoring, though. Condense the important info from a report (like “No alerts” vs “Server X down!”) and put it on the browser toolbar.

Wow… Jakob Nielsen certainly woke up on the wrong side of the bed this morning. His latest Alertbox, Search Engines as Leeches on the Web, starts out:

Search engines extract too much of the Web’s value, leaving too little for the websites that actually create the content. Liberation from search dependency is a strategic imperative for both websites and software vendors.

Nice. Because, God knows, you wouldn’t want people to find your site, would you? He rambles on with a whole bunch of garbage about search engine advertising—wait, this is all about advertising? I thought this was supposed to be about searching!—and how, over time, it can take up more and more of your budget until it cancels out the gain you made on that new customer who got there through the ad.

There’s actually a useful bit at the end, though, in which he describes other ways to get people coming to your site—or rather, coming back to your site.

The real goal is to make users come back, and to have them come directly to your site instead of clicking on expensive ads. The ideas above are just a few ways to encourage repeat business. Further in-depth studies of user behaviors and customer needs should reveal many new ways of keeping users loyal.

Of course, no one has ever done that sort of study on how to keep people coming back to a store, or a brand name. Shyeah, right!

It’s kind of redundant to post a “Get Firefox!” banner to someone already using Firefox, but it’s useful to show them an upgrade banner if they’re on an old version.  It’s also useful to show Firefox users a banner for Spread Firefox.

This can be done easily with PHP or other server-side scripting languages, but sometimes you have to use static HTML files.  That’s where client-side scripting becomes necessary.  Last month I posted some sample code that used document.write, which doesn’t work with XHTML.  (On top of that, the <noscript> blocks I used ended up causing validation errors because of their location!)

I’ve redone everything with DOM scripting, which will work with either HTML 4 or XHTML 1.0.

1. Put the following in a file called sfxlinks.js:

function replaceFirefoxLink(linkID) {
   if(linkNode=document.getElementById(linkID)) {
      var newLink=document.createElement('a');
      var newImg=document.createElement('img');
      var change=0;
      if ( 0 <= navigator.userAgent.indexOf('Firefox/0') ||
         0 <= navigator.userAgent.indexOf('Firefox/1.0') ) {
         change=1;
         newLink.setAttribute('href','YOUR_UPGRADE_LINK');
         newImg.setAttribute('alt','Upgrade to Firefox 1.5!');
         newImg.setAttribute('title','Upgrade to Firefox 1.5!');
         newImg.setAttribute('src','PATH_TO_BANNER');
      } else if (0 <= navigator.userAgent.indexOf('Firefox')) {
         change=1;
         newLink.setAttribute('href','YOUR_REFERRAL_LINK');
         newImg.setAttribute('alt','Spread Firefox!');
         newImg.setAttribute('title','Spread Firefox!');
         newImg.setAttribute('src','PATH_TO_BANNER');
      }
      if(change) {
         newLink.appendChild(newImg);
         var parentNode=linkNode.parentNode;
         parentNode.replaceChild(newLink,linkNode);
      }
   }
}

2. Use your regular Spread Firefox affiliate link and add a unique ID — let’s use id="FxLink" as an example — to the <a> tag.

3. Load the script in your document’s <head> section:
  <script type="text/javascript" src="sfxlinks.js">

4. Call the function in the body onload event using the ID you chose in step 2:
  <body onload="replaceFirefoxLink('FxLink')">

When the  page loads, the script will check the visitor’s browser to see if it’s an old version of Firefox or a current version of Firefox.  If it’s an old version, it’ll replace your standard button with your upgrade button.  If it’s a current version, it’ll replace it with a Spread Firefox button with your referral link.  Otherwise, it leaves the button alone.

This has a lot of advantages over the old version, including XHTML compatibility, no need for <noscript> blocks, easier validation, and it still degrades gracefully (if JS is unavailable or old, it leaves your normal button in place).

You can see it in action on my website, Flash: Those Who Ride the Lightning.

Originally posted on my Spread Firefox blog.

WWW, while convenient to type, is rather unwieldy when spoken (at least in English). “Double-U double-U double-U dot some site dot com” takes a while to say. It’s not like, say, AAA, which can be easily spoken as “Triple-A.” Fortunately, these days most major sites have their servers configured to return the same web with or without the www. prefix, so you sometimes hear a website described with just its domain name.

This morning I caught the end of an interview on NPR’s Marketplace Morning Report, and the announcer explained that the full version of the interview was available on their website, “dub dub dub dot marketplace dot org.”

Slashdot posted a story about a new web browser called Flock. The source was an article at BusinessWeek. Now here’s the interesting part:

It’s a fairly long article about a web browser, and it mentions a few other web browsers including Firefox, Opera and IE. It also mentions websites Amazon.com and del.icio.us. But the only links in the article are to stock quotes and an earlier article.

I understand that it’s Business Week, and I’m not saying they should have linked to every website that was even tangentially mentioned—but you’d think they could have at least linked to the browser company they just profiled! I had to get that link from Slashdot! (Unfortunately, so did everyone else, so I won’t be able to look at the page until tomorrow.)

Edit: Compare the BusinessWeek article to Wired’s take from last month. Even taking into account that they’re written for different audiences, BusinessWeek still looks like a print article that’s been thrown up on the web.