Mozilla

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.

Posted by on at

20 comments

Comments are now closed.

  1. Luigi Montanez wrote on May 30th, 2011 at 08:05:

    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/

  2. zcorpan wrote on May 30th, 2011 at 08:08:

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

  3. Ms2ger wrote on May 30th, 2011 at 08:26:

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

  4. louisremi wrote on May 30th, 2011 at 08:31:

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

  5. Rick Waldron wrote on May 30th, 2011 at 09:38:

    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

    1. Luigi Montanez wrote on May 30th, 2011 at 09:53:

      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

  6. Jason wrote on May 30th, 2011 at 10:59:

    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?

    1. Robert O’Callahan wrote on May 30th, 2011 at 18:05:

      Yes — ::-moz-progress-bar.

  7. Chris wrote on May 30th, 2011 at 12:05:

    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.

  8. Andrei wrote on May 30th, 2011 at 13:52:

    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

    1. louisremi wrote on May 31st, 2011 at 05:29:

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

  9. Aslak Hellesøy wrote on May 30th, 2011 at 14:47:

    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).

  10. Robert O’Callahan wrote on May 30th, 2011 at 18:06:

    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.

  11. Frank wrote on May 31st, 2011 at 02:29:

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

    http://bit.ly/irM6XV

  12. Yaffle wrote on May 31st, 2011 at 09:03:

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

  13. Ahmet Ertem wrote on June 4th, 2011 at 04:59:

    I hope other browsers gonna be innovative like Mozilla…

  14. Pouet wrote on August 19th, 2011 at 05:19:

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

    1. Aslak Hellesoy wrote on August 19th, 2011 at 08:03:

      Webbit supports hybi-10:

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

  15. Pouet wrote on August 19th, 2011 at 09:21:

    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 :)

  16. anh tuan wrote on November 13th, 2011 at 00:03:

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

Comments are closed for this article.