Firefox 22 Beta Ready To Test
Written by Ian Elliot   
Thursday, 23 May 2013

Keeping track of where Firefox is going is difficult given you have at least two horizons to keep your eyes on. Here we have a brief look at what to expect in Firefox 22, currently in beta and close to being rolled out.

 

The big news in Firefox 22 is either WebRTC or asm.js depending on your particular interests.

WebRTC isn't new but now it is deemed stable enough to be on by default. 

What can you do with WebRTC?

The simple answer is that you can get at the user's video camera and audio and set up browser-to-browser channels. This basically gives you more access to the native hardware from JavaScript. You can use it to build web pages that, say, process images captured by a connected camera, work with audio or set up browser-to-browser chats. 

Why is it big news that WebRTC is on by default?

If you write a script that makes use of WebRTC to, say, access the users video camera then the browser will ask if this is okay. However, if WebRTC isn't enabled it just doesn't work. So if WebRTC isn't enabled by default you are going to have to first tell the user they need to enable it and then get permission to use the camera. The more likely it is that WebRTC is present and functioning in a browser, the more likely it is that WebRTC apps will be used, become popular, and replace proprietary solutions such as Skype. 

firefoxicon

Now to the curiously named OdinMonkey and asm.js. 

This is a way to make JavaScript run fast - hopefully fast enough for serious games and other apps that need speed. asm.js is a subset of JavaScript that can be run in an optimized JavaScript engine that recognizes asm.js - and this is what OdiinMonkey is. As asm.js is just plain old JavaScript, but written in a particular way, an asm.js program will run on any browser, but it will only go faster if ther is an optimizing JavaScript engine like OdinMonkey. 

What can you do with asm.js?

In most cases you probably aren't going to write directly in asm.js - although you could. It is intended that compilers from languages like C/C++ will be used to create asm.js applications. At the moment this is the focus of the work, but in the future, who knows, there could be a JavaScript to asm.js compiler which would make standard JavaScript run faster. 

Is asm.js fast enough?

Well the answer depends on what you are trying to do. No language implementation can beat hand coded assembler, so there is always a hit to take in using a high level language. Recent benchmarks suggest that it isn't quite as good as Mozilla thinks. Standard JavaScript runs at slightly worse than 25% the speed of native (C++) code and asm.js runs at around 60% of the speed of native code. Notice that this implies that asm.js runs twice as fast as JavaScript code.  

It is good news that asm.js is in the beta and will soon be in the stable release but ... this is still just a Firefox feature. You can't expect asm.js to speed anything up on Chrome or IE.

 

firefoxicon

 

There are also some minor but important new features in Firefox 22.

You can now change the playback rate of HTML5 media. You can manage Firefox social services in the Add-ons manager and the Mac OS X download progress bar has been improved.  If you use WebGL, you will also be pleased to hear that it now renders faster because the Canvas update is asynchronous. 

Also new is default support for CSS3 Flexbox, a new font inspector. The HTML5 data and time tags are now supported. There are also two new APIs - the Web Notification API which allows you to show notifications outside of the browser as if they were native OS notifications; and the clipboardData API.  

The clipboardData API is big news for programmers wanting ways of getting data generated by a web app into a native app. For example, if you create an app that generates some graphics then you can now give the user the easy option of copy and pasting it into a desktop app. At the moment it isn't clear how compatible this is with the clipboard operations available in Chrome (22 on) and in IE. 

Firefox 23 is already available in the Aurora channel and at the moment the new features look mostly to be more developer tools. Stay turned for more information.

 

firefoxicon

More Information

Beta 22 Release Notes

Surprise! Mozilla can produce near-native performance on the Web

Related Articles

Mozilla WebRTC Goes Mainstream       

Mozilla Builds Servo, a New Browser Engine       

Firefox Runs JavaScript Games At Native Speed       

Which Browser Holds Sway?       

JavaScript Assembly Language       

 

To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, FacebookGoogle+ or Linkedin,  or sign up for our weekly newsletter.

 

 

espbook

 

Comments




or email your comment to: comments@i-programmer.info

 

Banner


PHP 8.4 Adds Property Hooks
26/11/2024

PHP 8.4 is available with improvements including property hooks, asymmetric visibility, and an updated DOM API.



pg_parquet - Postgres To Parquet Interoperability
28/11/2024

pg_parquet is a new extension by Crunchy Data that allows a PostgreSQL instance to work with Parquet files. With pg_duckdb, pg_analytics and pg_mooncake all of which can access Parquet files, is  [ ... ]


More News

Last Updated ( Thursday, 23 May 2013 )