Wednesday, October 15th, 2008

Firefox 3.1 beta: Geolocation, @font-face, Video and Audio, XHR++, and TraceMonkey

Category: Browsers, Firefox

>Isn’t it great that a browser point release these days adds so many features? We are starting to see this from Firefox, Opera, WebKit and others, and it is exciting!

The Firefox 3.1 beta 1 release has a slew of features that developers have been craving:

Geolocation

The labs team got Geode out there, and quickly we have seen the addition of the W3C Geolocation API added to the Firefox core. I can test Where Are You with a native implementation.

@font-face

WebKit lead with their @font-face implementation, and getting browser #2 to support it is huge. Now you can load up a font using same-origin rules via simple CSS:

  1. @font-face {
  2.   font-family: "Bitstream Vera Serif Bold";
  3.   src: url("http://developer.mozilla.org/@api/deki/files/2934/=VeraSeBd.ttf");
  4. }

Video and Audio

We now have lots of examples testing out the video and audio tags with support for both OGG Theora and OGG Vorbis.

This is something that the Web really needs to work out. The codec game is far from Open, and with native support we get to do cool things such as integrating media with canvas, svg, and plain old HTML. Take a video, add transparency, and skew it a little…. and add an overlay message.

XHR Updates

XHR Progress Notification

We’ve added a better way to get progress notifications for XML HTTP Requests. We’ve implemented the W3C Draft Spec on progress events. In Firefox 3 the events available on the XHR object were progress, uploadprogress, load, abort and error. For 3.1 we now support the loadstart, progress, load, abort and error events. (uploadprogress is also supported, but is deprecated.)

There’s a great example of the new progress events by Olli Pettay. It’s very simple and does everything in a single script.

XHR Cross-site Access Control

We’ve implemented the draft specification for access-control for cross-site requests.  Web developers have long wanted to be able to get data from one site on another but same-origin restrictions on many types of requests prevent many developers from mashing up content.  This new access control mechanism offers the ability for servers, content and web clients to cooperate to make a lot of new things possible on an opt-in basis.  The spec is complex, and support is new, so if you’re interested reading the spec is probably the best thing to do.  It contains examples and uses cases.

Fast JavaScript VM

An early version of TraceMonkey is here:

Beta 1 does include TraceMonkey, our super-fast JavaScript engine, but it’s not turned on by default.  If you do want to turn it on, go to about:config, set javascript.options.jit.content to True, restart your browser and try it out.

This is an early beta, of course, so there will be issues. Please file bugs if you find sites that don’t work or cause crashes or hangs. The more testing we get, the better it will be when we turn it on.

Phew, good times for browsers == good times for Web developers.

UPDATE

More browser news, Flock 2.0 is out there, providing a very social browsing experience.

Posted by Dion Almaer at 12:01 am
Comment here

++++-
4.6 rating from 30 votes

Comments Here »

Comments feed TrackBack URI

Leave a comment

You must be logged in to post a comment.