Welcome to the Future of Firefox

Be the first to know what's new with upcoming Firefox releases.

Posts from November, 2011

Updating Firefox in the Background

Blog by Ehsan Akhgari, Firefox Engineer

The dialog below should look familiar. It displays while Firefox completes the update process after a new version is installed and the browser is restarted.

Background1

In order to update itself, Firefox first starts to download an update in the background. When the update is downloaded, Firefox stages it in a directory ready to be applied. The next time that Firefox is about to start up, it checks out the staging directory. If an update ready to be applied is found, Firefox launches the updater program, and applies the update on top of the existing installation (showing that progress bar as it’s doing its job). When the update process is finished, the updater program restarts Firefox. All of this happens as you’re waiting for your browser to start up in order to do what you wanted to do. This is clearly less than ideal.

For the past few weeks, I have been working on a project to improve this process. The goal of my project is to minimize the amount of time it takes for Firefox to launch after downloading an update. The technical details of how I’m fixing this problem can be found this document. Here’s a short version of how the fix works. When Firefox finishes downloading an update, it launches the updater application in the background without displaying any UI, and applies the update in a new directory that is completely separate from the existing installation directory. Instead of staging the update itself, an entire updated version of Firefox is staged. The next time that Firefox starts up, the existing installation is swapped with the new updated installation which is ready to be used. In this scenario, you likely won’t notice that Firefox has applied an update as no UI is shown.

Now, the reason that this approach fixes the problem is that swapping the directories, unlike the actual process of applying the update, is really fast. We are effectively moving the cost of applying the update to right after the update has been downloaded while the browser is running. This leaves only the really fast copy operation to be performed the next time that the browser starts up.

I have some experimental builds with this feature ready in a temporary channel called Ash. The implementation is now at a stage where it can benefit testing from the community. You can download the latest builds here. I will trigger a few nightly builds on this branch every day so that you would get updates if you’re running an Ash build.

In order to help with testing this new update process, all you need to do is to download the latest build from Ash, then wait a few hours so that a new nightly build becomes available, and then update to that build. Updating can be triggered manually by opening the About dialog, or by the background update checker if you leave the build running for a few hours. If everything works correctly, when you restart Firefox, you should get a new build without seeing any progress bar as Firefox is starting up. In order to verify that you have indeed been updated to a new build, you can go to about:buildconfig, copy its contents, and then compare it with the contents of about:buildconfig when Firefox starts up after an update.

It would be extremely useful if you can test this with different types of security and anti-virus software running. If you observe any problems or warning, or if you see that the update did not change the contents of about:buildconfig, then please let me know so that I can try to fix those problems.

For people who are curious to see the code, I’m doing my development on this branch, and I’m regularly posting patches on bug 307181.

Please note that this is still in the testing stage, and at this point, we’re not quite sure which version of Firefox this will land in (we’re working to land it as soon as is safely possible). No matter which version of Firefox includes this feature for the first time, we believe that this will be a very positive change in making the Firefox update experience more streamlined for all of our users.

Latest Firefox Aurora is Now Available!

The latest Firefox Aurora is now available for download and testing!

What’s New in Firefox Aurora:

Try these new experimental features now and start testing!
Download the latest Firefox Aurora and provide feedback. Feedback on these new features help us determine what makes it to beta and final releases.

New Firefox for Android Beta Optimized for Tablets

A new Firefox Beta for Android is now available for download and testing. This beta introduces a completely new experience optimized for tablets that makes mobile browsing more intuitive and new tools that enable developers to create interactive mobile Web experiences.

What’s New in Firefox Beta for Android:

  • New Look for Tablets: Firefox Beta has a new experience for tablets that leverages the large screen size and makes mobile Web browsing more intuitive. Popular Firefox features like tabs and the Awesome Screen are optimized for tablets.
  • Full-Screen Portrait Browsing: Firefox Beta takes advantage of large tablet screens so you can use the full screen to browse the Web, even in portrait mode. Tabs are listed in a top left menu and easily hide when you don’t need them.
  • Tab Optimization: Tabs are shown as thumbnails in the left panel of Firefox Beta, allowing you to easily switch between tabs while still viewing full websites on the right. You can swipe to the left to hide tabs for a full screen view.
  • New Action Bar with Quick Access Buttons: You can access Firefox Preferences, Add-ons, downloads and more in the new Action Bar menu (next to the Awesome Bar). The Action Bar adds back, forward and bookmark buttons for easy access.

What’s New For Developers:

  • HTML5 Input Tag for Camera Access: Developers can build mobile websites and Web apps that allow you to use the camera on an Android phone or tablet to take pictures, scan bar codes and more without leaving Firefox. To see a demo of the camera input element in action, click here.
  • HTML5 Form Validation API: Firefox Beta supports the HTML5 Form Validation API which automatically validates website form fields like numbers, emails and URLs without developers needing to write a custom code or use a third-party library.

For more information:

New, Faster Firefox Beta is Ready for Testing

A new Firefox Beta for Windows, Mac and Linux is now available for download and testing. This beta enhances JavaScript performance and adds developer tools that make Web browsing much faster.

What’s New in Firefox Beta:

  • Type Inference: Firefox Beta adds Type Inference to make JavaScript significantly faster. To learn more about how rich websites and Web apps with lots of pictures, videos and 3D graphics will load faster in Firefox, check out this blog post.
  • Mac OS X Lion Support: Firefox Beta has a new look that matches the Mac OS X Lion application toolbar and icon styles. Firefox Beta also supports the two finger swipe navigation gesture and makes it easier to use multiple monitors.
  • Do Not Track JavaScript Detection: Firefox Beta enables JavaScript to show developers when users choose to opt-out of behavioral tracking with the Do Not Track privacy feature.
  • Chunked XHR Support: Firefox Beta supports chunking for XHR requests so websites can receive data that’s part of a large XHR download in progress. This helps developers make websites and Web apps faster, especially those that download large sets of data or via AJAX.
  • If you’re a developer, please visit the Firefox for Developers page.

For more information:

Type Inference brings JS improvements to Firefox Beta

Blog by Brian Hackett, Firefox Engineer

Firefox 9 features the release of Type Inference, or TI, a research project under way for over a year. TI is a feature in the SpiderMonkey Javascript engine which generates type information about Javascript programs through a combination of analyzing the program’s code and monitoring the types of values as the program executes. This type information is used during JIT compilation to generate more efficient code; Firefox 9 includes modifications to the JaegerMonkey JIT compiler to use inferred type information. This compilation mode, which is the default in Firefox 9, speeds up major benchmarks like Kraken and V8 by over 30%, and gives a large speed boost to many JS heavy websites.

Javascript is a dynamically typed language, and without knowing the types of values a JIT compiler needs to generate code that accounts for all the possible types of the involved values. This significantly slows down execution of the program in comparison with a statically typed language like Java. With TI integration into JaegerMonkey, we are closing a significant part of this performance gap. Ongoing Mozilla projects are being built to leverage inferred type information. With these projects, primarily IonMonkey, Mozilla’s next generation JIT compiler, we hope to close the performance gap with Java completely. A more detailed writeup on the internal algorithms and other techniques used by Type Inference is available here.