Aurora 6 is here

What’s new in Aurora 6?

The most notable addition to this new Aurora are the <progress> element, window.matchMedia API, better APIs for binary data, Server-Sent Events as well as the return of WebSockets.

Aurora 6 has been published last week and can be downloaded from firefox.com/channel.

The <progress> element


screenshot of progress bars as seen on windows
This element can be used to give a visual cue of something in progress in the page. System progress bars are being used, which means that users of MacOS and Linux will see something different than what is pictured here.

matchMedia

window.matchMedia() is the javascript equivalent of CSS Media Queries.

Binary data APIs improvements

  • XHR2 responseType and response attributes allow getting the response from an XHR in the form of efficient Blob or ArrayBuffer.
  • FileReader.readAsArrayBuffer() allow reading files and get the response as an ArrayBuffer.
  • BlobBuilder allow concatenating multiple blobs as well as text and ArrayBuffer into a single Blob.

Expect to see even more improvements in this area in Aurora 7.

Server Sent Events

Server Sent Events are a mean for a server-side script to generate client-side events accompanied with data.


Messages generated on the server-side with a text/event-stream mime-type and consist of a list of events data.

data: data generated by the server

data: this line will generate a second event

WebSockets are back!

WebSockets can be used to create an interactive communication channel between a browser and a server. They are already used to build “HTML5” chats, multiplayer games, and much much more.
Note that this API will be temporarily namespaced in prevision of upcoming changes to the specification.

Other Interesting Additions

Learn about what’s new in Aurora 6’s user interface on blog.mozilla.com/futurereleases and let us know what you think.

About louisremi

Developer Relations Team, long time jQuery contributor and Open Web enthusiast. @louis_remi

More articles by louisremi…


20 comments

  1. Luigi Montanez

    I don’t understand the tag-based syntax for SSE. The spec says they should be instantiated with new EventSource(‘server.script’).

    http://dev.w3.org/html5/eventsource/

    May 30th, 2011 at 08:05

  2. zcorpan

    The Server Sent Events example is outdated by several years. There’s no “event-source” element.

    May 30th, 2011 at 08:08

  3. Ms2ger

    Indeed. The example has been removed, a new one is being written.

    May 30th, 2011 at 08:26

  4. louisremi

    Thank you for your vigilance, the snippets of Server-Sent Events have been updated.

    May 30th, 2011 at 08:31

  5. Rick Waldron

    Glad to see support for the EventSource API has made it to Firefox.

    There is a major flaw in all existing implementations in that they do not actually open a “listener” for some sort of event that is generated and sent from the server. What has actually been implemented is the equivalent to a native polling mechanism, which is useful none-the-less.

    Last fall I released a test supported (unit and spec tests) jQuery extension that provides a unified API (using XHR as fallback). https://github.com/rwldrn/jquery.eventsource

    Additionally, I’ve created these useful EventSource API tests, snippets and demos:

    Serializing Array to JSON data:
    https://gist.github.com/415294

    Echo serialized GET params:
    https://gist.github.com/415836

    Sending GET params:
    https://gist.github.com/415836

    I have a number of other gists: https://gist.github.com/gists/search?q=eventsource&page=1

    A quickstart guide to EventSource:
    http://weblog.bocoup.com/chrome-6-server-sent-events-with-new-eventsource

    An article I wrote about creating EventSource from WebWorker threads: http://weblog.bocoup.com/javascript-creating-an-eventsource-within-a-worker

    A mini-web-chat written with EventSource:
    http://weblog.bocoup.com/jquery-eventsource-yakyakface-com & http://yakyakface.com

    May 30th, 2011 at 09:38

    1. Luigi Montanez

      Thanks for the resources Rick, you really know your EventSource!

      For those interested, I wrote a case study on WebSockets compared to EventSource, with a particular focus on server-side support.

      http://www.html5rocks.com/tutorials/casestudies/sunlight_streamcongress.html

      May 30th, 2011 at 09:53

  6. Jason

    Is it possible to style the value part of the progress element?

    Apparently webkit browsers use a pseudo-element “::-webkit-progress-bar-value” is there a moz equivalent pseudo-element for that?

    May 30th, 2011 at 10:59

    1. Robert O’Callahan

      Yes — ::-moz-progress-bar.

      May 30th, 2011 at 18:05

  7. Chris

    Any idea on when navigation timing is going to make it in?

    For reference: http://w3c-test.org/webperf/specs/NavigationTiming/

    This has already made it into Google Chrome(as of version 6) and now in Internet Explorer 9.

    May 30th, 2011 at 12:05

  8. Andrei

    I tried the progress example on Nightly version 7.01a on Ubuntu, and apparently can only exists one progress tag per section. I had to put the each progress in an individual div to all of them appear on the page, otherwise only the first appear

    May 30th, 2011 at 13:52

    1. louisremi

      My bad, the progress element has to be written , not like I originally wrote.

      May 31st, 2011 at 05:29

  9. Aslak Hellesøy

    Great to see support for EventSource in Aurora!

    I don’t know many web servers that support it, but here is one: http://webbitserver.org/ (disclaimer: I’m a contributor).

    May 30th, 2011 at 14:47

  10. Robert O’Callahan

    Louis, I think you could have mentioned -moz-hyphens as a notable addition. This is the first release where we’ve supported any kind of auto-hyphenation.

    May 30th, 2011 at 18:06

  11. Frank

    FYI you can do websockets in IE now too using this hack:

    http://bit.ly/irM6XV

    May 31st, 2011 at 02:29

  12. Yaffle

    see https://github.com/Yaffle/polyfills for EventSource polyfill usingn “server push” for IE8+,FF!

    May 31st, 2011 at 09:03

  13. Ahmet Ertem

    I hope other browsers gonna be innovative like Mozilla…

    June 4th, 2011 at 04:59

  14. Pouet

    Does anyone know if there is a java websocket server compliant with Hybi-10 ?

    August 19th, 2011 at 05:19

    1. Aslak Hellesoy

      Webbit supports hybi-10:

      http://aslakhellesoy.com/post/8662017748/webbit-0-2-0-with-hybi-10-support

      August 19th, 2011 at 08:03

  15. Pouet

    Yes, i’ve tried webbit, but without success. The websocket was instantly closed in the browser, and i didn’t see any trace of activity server-side in onOpen, onMessage nor onClose. Well, i’ve just tried quickly so i probably missed something. Thanks anyway :)

    August 19th, 2011 at 09:21

  16. anh tuan

    does any one know encode an decode hybi 10 in java to send and receive message in websocket? thank

    November 13th, 2011 at 00:03

Comments are closed for this article.