Firefox 3.6 for Developers

Last week we looked at Firefox 3.6 from the user perspective. This week we'll take a quick look at some of the under-the-hood improvements for Firefox 3.6 for developers.

Typically when a new browser release comes out, the end-user features get a big press lovefest and the developer goodies are generally glazed over. While the obvious bits are good to know about, the developer story is every bit as important.

A lot of the goodies in Firefox 3.6 aren’t for users at all. Well, they are but they’re things that users will see or interact with directly, or notice. Of course, when I say “users,” I mean “users who aren’t Web developers.” Web developers have quite a few things to like in Firefox 3.6. Let’s take a look at some of the under-the-hood improvements in 3.6

HTML5 Goodness

HTML5 adds support for web applications to work with local files using input elements and via drag-and-drop. This means users can work on files before they’re uploaded and more like they would interact with a desktop application.

Mozilla has also niced up the support for the video element in 3.6 by adding support for the “poster” attribute of the element. This lets developers specify a static image to display before the first frame of video starts. Can be useful for making sites with streaming video look better until the video is playing.

Prepping for Tablet and Mobile Devices

Users are interacting with devices in entirely new ways thanks to thinks like mobile phones, netbooks, tablets, etc. In the bad old days, you plopped a computer down on the desk or maybe dragged the laptop over to the couch, but by and large systems were stationary.

Now we have nifty devices that go everywhere, and might not have a fixed orientation to the world. Assuming those devices can report their orientation, the MozOrientation event can be triggered when a device’s accelerometer signals a change in orientation.

Developers can provide a stylesheet for landscape and portrait orientation, so users can get the best view of a site no matter how the device is being held.

Web Open Font Format

Firefox 3.6 is the first release to support the Web Open Font Format (WOFF). This specification allows developers to embed fonts in their Web site and pass them on to the browser with metadata about licensing information, if desired. The upshot of this is that foundries may license fonts for Web use, if designers/developers wish to use proprietary fonts.

Note that this isn’t a form of DRM. It’s a way to “tag” a font with information about the font and its origin. A few foundries are already onboard and it seems likely others will follow.

Users running 3.6 can see some examples of WOFF in action on the Hacks.mozilla.org site.

CSS Improvements

In addition to nicer fonts, 3.6 brings additional CSS properties to spiffy up sites. Note that some of these are Firefox/Mozilla specific, so they may not be suitable for cross-browser development.

Gradients are now possible with 3.6, using the -moz-linear-gradient and -moz-radial-gradient properties. A demo is available on the Mozilla developer site. Note that if you view it using Chrome or another non-Moz browser, you’ll just see empty boxes where the gradients should be.

When just one background image won’t do, Firefox now supports multiple background images that can be layered on top of one another. This can be used to create some very pretty sites, but again — it may not work in other browsers at this time.

Finally, developers can use the pointer-events property to control if an element on a page can be a “target” of a mouse event. This makes it possible to direct mouse events to something below an element. Use-cases for this element are being collected on the Mozilla wiki.

Why it Matters

Right now, Firefox is riding the wave of user acceptance and enjoying enormous momentum. To keep that up, they’re going to have to keep making developers happy too and giving them tools that they may not have in other browsers.

Google has already had enormous success attracting developers to write extensions for Chrome. There’s nothing to say that developers can’t do both (and quite a few popular Firefox extensions now have siblings in the Chrome lists) but there’s no guarantee that they would, either.

So expect to see a lot of improvements in Firefox not just for users in 2010, but for developers as well. This is also part of the reason for the push behind JetPack — to make it much easier to develop for Firefox.

What’s important to you in a browser? I’d be curious to hear exactly what readers are most interested in with regards to browser features and what makes a browser “perfect.” We all have different criteria, of course, but I’d like to hear from others what makes a browser a must-have or an application to avoid.

Comments on "Firefox 3.6 for Developers"


What\’s vital to me as a user is being in control and secure. Being able to customise anything that is annoying me, trust and privacy.

cool new features that I would not have thought of trying e.g. the Awesome bar (front end) or Plug in isolation (back end) so the vision thing is important.

Stability – can\’t remember the last time that FF crashed and I am running 31 (carefully tested) extensions.

I am now using Chromium as a back up browser. Also because of its raw speed I use it for opening a huge local html file(parses in 5sec not 25sec). But I cant see me moving full-time to it because of the reasons I have outlined above.

My Details:
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2) Gecko/20100123 Ubuntu/9.10 (karmic) Firefox/3.6 – Build ID: 20100123214900


One thing important to me, is that Firefox needs a way to prevent the junk that Microsoft is installing in the browser as plugins without the user knowing about it. If I wanted IE, I\’d use it. I don\’t want M$ screwing up Firefox because people are abandoning their pitiful \”browser\”