Wednesday, March 23, 2011

Back to the front of the pack: Ars reviews Firefox 4(Gallery Photos)


Mozilla has officially released Firefox 4, a major update of the popular open source Web browser. The new version introduces a much-improved user interface, significant performance enhancements, strong support for the latest Web standards, and noteworthy new features like built-in support for synchronizing bookmarks and other browser data.
Firefox 4 has been under development for over a year—the last major update, version 3.6, was released in January 2010. The 4.0 release arrives at a time when the Web is enjoying an unprecedented level of competition and a rapid pace of evolution. Although Mozilla arguably deserves a lot of credit for the role that it has played in accelerating the advancement of the open Web, the organization fell behind competing browser vendors due to the protracted length of its development cycle. The 4.0 release catapults Firefox back to the front of the pack, bringing parity in performance, features, usability, and support for Web standards.
User interface
Firefox 4 includes some of the most significant user interface changes in the browser's history. The tabs have been moved to the top of the window, above the main navigation bar. Other elements of the user interface have also been streamlined.
The stop and refresh features, which previously had their own dedicated buttons in the navigation toolbar, have been combined into a single button that is integrated into the tail end of the URL box. The bookmarks bar has been collapsed into a single button that is positioned at the right-hand edge of the main toolbar. The home button was moved to the immediate left of the new bookmarks button.
Mozilla has removed the conventional statusbar from the bottom of the window, replacing it with the same kind of transient statusbar that Google uses in Chrome. When the user hovers their cursor over the contents of an anchor tag in a Web page, the destination URL will appear in a floating rectangle at the bottom of the window. Mozilla experimented with several other ways of presenting the destination URL during the Firefox 4 development cycle, including an approach where the destination URL was displayed as an overlay in the URL box, before settling on Chrome's method.

The traditional menubar has been eliminated in the Windows version of Firefox, replaced by a single button embedded in the titlebar. The menu items have been greatly consolidated into a compact two-pane listing. Some items, such as copy and paste, have been integrated as buttons in the custom menu so that you don't have to dig into submenus in order to access them.

The add-on dialog box has been replaced by a new interface that opens in a tab. It feels much cleaner than the old dialog and has a much slicker design. In light of the fact that add-on users tend to use a lot of add-ons, giving the add-on interface more space seems like a really good move. Like the old dialog, it has a built-in search feature that allows the user to find new add-ons to install. The feature has been taken a step further in Firefox 4, however, because you can now see additional details about an add-on directly through the interface. It will largely obviate the need to visit the actual addons website for most users.

The collective impact of these user interface changes is largely positive. The browser feels much cleaner and less intrusive during use. The degree of minimalism in Firefox 4 is roughly on par with Chrome, but not quite as extreme as in IE9. The one area where Firefox still feels needlessly cluttered to me is the separation of the search box and the URL box in the navigation bar.
Mozilla has declined to combine the search and URL boxes for privacy reasons: characters typed into the search box get relayed to Google for query suggestions—a behavior that some users wouldn't feel comfortable having in the regular URL box. For those of us who don't particularly mind, there is a nice add-on called Omnibar that will elegantly combine the two boxes (just like Chrome) for an even more streamlined user interface.
After months of using the Firefox 4 pre-release builds, I already feel entirely at home in the new user interface. Some long-time users, however, might have a harder time adjusting to the changes or might not appreciate the streamlining. Fortunately, Mozilla has done an excellent job of baking configurability into the new UI.
Most of the major interface changes that have been introduced in Firefox 4 can be trivially reverted or adjusted. For example, you can swing the tabs back below the navigation bar by right-clicking in the toolbar area and unchecking the "Tabs on Top" item in the context menu. You can similarly restore the conventional menubar by toggling the relevant context menu item.

Those of you who don't like the new combined stop/refresh button can break it apart and move it out of the textbox with the browser's standard toolbar customization feature. The menu that pops out of the new bookmarks button has a "View Bookmarks Toolbar" item that you can click to expand the button into a whole separate toolbar row that behaves like the one in previous versions of the browser.


In previous versions of Firefox, the statusbar has also historically been used to display icons for interacting with add-ons. In order to continue serving that need, Mozilla has added an optional add-on bar that you can toggle from the titlebar context menu or by hitting a key combination. There isn't a way to get the anchor destination URL to show up in this bar, however, so there isn't really a way to fully restore the traditional statusbar.
Tab management
Firefox 4 introduces some major improvements to tab management, including an innovative new tab group feature. The improvements to tab management are largely a response to the increasingly central role that the browser plays on the user's desktop. As more software shifts into the cloud, the browser is becoming less like a document viewer and more like a task manager for interacting with Web applications.
One of the new tab management features is support for App Tabs, which the user can "pin" to the tab bar. Pinning a tab will strip out the title and shift it to a position at the front of the tab bar. This is generally useful for websites like GMail or Seesmic Web that users tend to leave open all the time. You can get them out of the way of the rest of your tabs and reduce the amount of space they consume in the tab bar. As we will explain later, these also have special behavior in tab groups.
Although App Tabs are intended--as the name suggests--for Web applications, there are no restrictions on what kind of tabs you can pin. I pin an Ars Technica tab, for example, because it's a website that I happen to leave open in my browser all day.
Another really nice new feature for tab management is support for tab switching through the AwesomeBar, Firefox's sophisticated URL box autocompletion system. When you start typing into the URL box, the AwesomeBar results will now include existing open tabs alongside bookmarks and history items. When you select an open tab, the browser will bring the relevant window and tab group to the front and show you the desired tab.

This is especially useful for keyboard-savvy users who tend to have a lot of windows and tabs open during the day because you can easily get back to one without having to remember where you left it. You can even filter the AwesomeBar to show only existing tabs by typing a "%" character at the beginning before you type the letters that you want to match against.
Tab Groups
Tab groups are one of the most impressive new feature in Firefox 4. Users can organize the tabs within a window into groups and arrange them spatially in a thumbnail overview display. During regular browsing, only the tabs in the currently active group show up in the tab bar at any given time. This feature makes it really easy to organize tabs into separate activities that the user can switch between at will.
For example, I can have one set of tabs that relates to my personal computer programming project and another set of tabs that is dedicated to the research I'm conducting for an article that I plan to write. When I'm done working at the end of the week and I'm going to start on my weekend hobby project, I can just switch to the relevant tab group. When I start working again on Monday morning, I can switch right back to the research tab group. Yes, the life of a technology journalist is really that glamorous.
The thumbnail overview mode, which is called the Firefox Panorama, can be accessed by selecting the Tab Groups item from the tab overflow menu. There is also a button that you can optionally add to the toolbar or tab bar to access it with one click. In the overview mode, you can arrange your tabs within groups, move tabs between groups, create new and delete groups, and assign titles to your groups.

The tab group feature was originally demonstrated in July as an experiment codenamed Tab Candy. The underlying concept is one of the most significant contributions that designer Aza Raskin made to Firefox during his time at Mozilla. Aside from major stabilization and bugfixing, the implementation hasn't changed much since the original debut of the Tab Candy prototype.
Although tab groups radically simplify tab management and significantly increase the scalability of tab interaction, the feature still has some fundamental failings that sabotage its usefulness. The single biggest weakness of tab groups is that you can't move them between windows.
Grouping your tabs can reduce the total number of windows that you feel the need to have open at once, but the inability to move groups between windows seriously impairs flexibility. There are situations, for example, where I want to be able to tear a particular group out into its own window so I can put it on another workspace or view it at the same time as another group. I also often spawn a window and accumulate a number of tabs while working on something and then find that I want to pop it into an existing window as a group for easy access later. In those scenarios, the limitations of tab groups are tremendously frustrating.
Another serious problem with tab groups is that there isn't a persistently visible indication of how many groups you have in a single window. I occasionally close a window without realizing that it had other groups in it that I wanted to keep. When I make that mistake, I often don't realize until much later, when it's much harder to reconstitute the tabs that I've lost. I've started compulsively activating the Firefox Panorama before I close any window, just so that I can make sure I'm not losing anything.
The real deal-breaker for me, however, is the difficulty of finding misbehaving tabs. The tab group feature makes it easy to navigate between dozens—or even hundreds—of tabs, but there are a lot of annoyances that crop up when you have that many tabs open.
For example, a particular website that I sometimes visit had a JavaScript-based snowflake animation during the holiday season that hammered my CPU. It took me over an hour of closing and reopening tabs and tab groups to find the culprit amid all the tabs that I had open at the time. In Chrome, I could have trivially solved the problem by cracking open the browser's built-in process manager and sorting by CPU usage.
Although I'm still very excited about the long-term potential of the feature, I was disappointed to find that tab groups in Firefox 4 ended up being impractical for day-to-day use. The feature could be a lot more valuable in the future when some of the issues are addressed.
Do not track
The privacy implications of targeted Internet advertising are becoming a bigger concern due to the growing invasiveness of tracing technology and the trend towards consolidation in the Internet advertising industry. As we have previously explained, regulators have taken an interest in ensuring that proper opt-out mechanisms are made available to consumers. The advertising industry itself has been cooperative with policymakers and relatively proactive in its own efforts at self-regulation.
The advertising industry provides tools that allow users to opt out of tracking by automatically configuring certain cookie values. The cookie-based solutions work reasonably well, but are limited by a general lack of consistency, predictability, and transparency to consumers. If a user clears their cookies, for example, they have to make sure they run the opt-out configuration tool again.
In an effort to establish a more streamlined solution to the opt-out issue, Mozilla proposed a new mechanism that would not be susceptible to the cookie problems. The approach favored by Mozilla is a special HTTP header that indicates to servers that the user wants to opt-out of advertising. Mozilla has added support for this feature in Firefox 4 and has made it accessible through a checkbox in the browser's preference dialog.
It's extremely important to understand that this checkbox doesn't directly block tracking. All it does is broadcast the user's opt-out preference to servers. The obvious problem with this approach is that it doesn't accomplish anything unless there is widespread industry acceptance of the custom header. There is no means of enforcing the preference or compelling advertisers to support it properly. Mozilla added the feature to Firefox 4 with the hope that it would encourage advertisers to get on board.
Mozilla says that at least one major Internet advertiser has already committed to respect the header. In light of the enthusiasm for voluntary compliance that the major advertising companies have demonstrated in the past, there is hope that the plan will eventually be successful without necessitating regulatory intervention.
Although it's clear that Mozilla's approach is better in the long-term, it doesn't provide any active protection against tracking today. By comparison, Microsoft's Do Not Track mechanism in IE9 takes much stronger steps to protect the user by actively blocking tracking mechanisms. IE9's robust anti-tracking feature is implemented in much the same way as ad-blocking software—it compares against a blacklist that is regularly updated from an Internet source. Mozilla's Do Not Track feature obviously does much less today than Microsoft's.
Web standards
Firefox 4 is powered by the new Gecko 2.0 rendering engine, which offers strong support for the latest standards-based Web technologies. One of the most significant additions on that front in 4.0 is an implementation of WebGL, an emerging standard that enables Web pages to display embedded 3D graphics.
The WebGL standard essentially defines a thin JavaScript wrapper around the OpenGL ES APIs, allowing Web developers to render 3D graphics in a Canvas element with JavaScript. It's an extremely low-level API that is provided for flexibility. The expectation is that third-party developers will supply higher-level abstractions for various kinds of 3D programming tasks in external libraries.
The concept behind WebGL emerged from an experimental plugin that was developed by a Mozilla engineer. Mozilla later teamed up with Khronos, the organization behind the OpenGL standard, to establish a collaborative process for drafting a formal WebGL specification with other industry stakeholders.
WebGL has gotten strong buy-in from other browser vendors, including Apple and Google. There are already some innovative software projects that take advantage of the technology and a few third-party frameworks that aim to ease WebGL development. Mozilla's own implementation of WebGL debuted in Firefox test builds in 2009. After a few years of development, Mozilla is finally ready to support WebGL in an official Firefox release.
WebGL is a compelling addition to Firefox. As the standard sees broader adoption, it will open the door for richer visualizations and more sophisticated gaming on the Web.
Firefox 4 also gained more comprehensive support for HTML5 Forms—an assortment of new markup elements and attributes that increase the expressiveness of form creation and facilitate a more declarative approach to form handling—reducing the need for JavaScript glue code. Firefox 4 adds new form input types, improved support for automatic validation, and a placeholder attribute for displaying a sample value in a field.
Performance
Mozilla has delivered a major performance boost in Firefox 4. The speed of JavaScript execution has been significantly increased thanks to the new JaegerMonkey JavaScript engine. It uses a per-method JIT approach to do more aggressive native compilation than the previous TraceMonkey engine. The underlying assembly generator was taken from Apple's open source Nitro JavaScript engine.
Another new feature in JaegerMonkey is inline caching, which reduces the lookup time for property values. There are a number of additional optimizations to value storage and other areas of the JavaScript engine that further help to improve performance. The end result is that Firefox 4 scores roughly three times better than Firefox 3.6 in the SunSpider and Kraken benchmarks and six times better in the V8 benchmark.
These improvements have brought Firefox back into the JavaScript performance race by making it competitive with other browsers. We will have more detailed benchmark data comparing Firefox with other browsers in an upcoming article.
Rendering performance in Firefox 4 benefits from the addition of hardware acceleration—the ability to offload some of the rendering overhead to the GPU. On Windows 7 and Windows Vista, Mozilla uses Direct2D to accelerate content rendering, including HTML Canvas drawing. Hardware acceleration is also used to speed up compositing, the process of assembling the page content. Limited support for hardware acceleration is available to Mac OS X and Linux users via OpenGL on systems with compatible graphics hardware, but Canvas content isn't accelerated on those platforms yet.
In a somewhat unique move, Mozilla has also labored to bring basic hardware accelerated rendering to Windows XP users via Direct3D. This is particularly significant, because Microsoft has declined to support IE9 on the legacy Windows XP platform. Although XP is nearing the end of its lifecycle and is expected to be completely unsupported in 2014, it is still used by an estimated 40 percent of Windows users. Firefox 4 will ensure that XP diehards have access to a browser with support for current Web standards.
Startup time and general responsiveness are also much-improved in Firefox 4. The browser starts and stops more fluidly and tends to hang less when it's loading back in a massive session at startup. Although the improvements are great and quite noticeable, the subjective snappiness still doesn't match Chrome yet. There are still noticeable issues with responsiveness that show up during extended use.
If the browser has been running for 10 hours or so and has a relatively high number of tabs open, things like tab switching and scrolling still get a bit sticky. During the past week of extensive testing with the release candidate builds, I found that I had to restart the browser at least every two days in order to maintain acceptable performance with my usual workload. That's better than the 3.6.x series, but it's still an area where Chrome has the advantage.
Synchronization
Firefox 4 comes with built-in support for Mozilla's browser synchronization service. The feature can keep the user's bookmarks, history, passwords, and other data synchronized between multiple computers. The user can also access their sync data with Mozilla's mobile version of Firefox or the stand-alone Firefox Home client application for Apple's iPhone.
Mozilla originally began experimenting with synchronization in 2007, when the Weave project was launched by Mozilla Labs. We recognized the significant potential of browser sync when we tested some of the first Weave prototypes that were released to the public. The promise of ubiquitous browsing was very appealing, but there were still a lot of problems to solve.
Weave matured considerably during its formative years as a Mozilla Labs project, eventually reaching the 1.0 milestone last year. The Weave branding was eventually dropped and it was renamed Firefox Sync as Mozilla worked to improve its usability and make it seamless enough to fit neatly into the default Firefox user experience.
One of the key characteristics of Firefox Sync is that the user's data is entirely encrypted on the client side. The sync server operator can't scrutinize the actual data that the user is transmitting through the service. As we explained in our recent look at browser sync protocols, the emphasis on security and use of encryption in Firefox Sync diminishes the flexibility of the service and creates challenges for interoperability, but it offers significantly more privacy than some competing services.
Another really great advantage of Firefox Sync is that users can optionally self-host their own backend sync server. Firefox is configured to use Mozilla's own server by default, but you can easily configure the browser's sync implementation to connect to any backend server you want. Mozilla has published the code of its own sync server, so you can easily install and configure it to run on your own hardware. This means that truly privacy-concious users can have full control over their own data.
Conclusion
Firefox 4 is another major breakthrough for Mozilla. It has restored Firefox's competitiveness at a critical moment when other browser vendors are gaining momentum. Microsoft is back in the ring with IE9 and seems to be more focused on standards than ever before. Mozilla will have to become more agile if it wants to stay ahead of the game.
Mozilla is already planning to adopt a more incremental development model, as expressed in its ambitious 2011 roadmap and recent operational overhaul proposal. Although we are somewhat skeptical about Mozilla's ability to meet its roadmap goal and deliver three more major releases this year, Firefox would still benefit from any effort to reduce the time between releases. Even a biannual release cycle would be advantageous at this point.
One of the major areas where Firefox is still lagging behind other browsers is its lack of support for process isolation—a feature that has significant implications for reliability and security. A Firefox pilot project for multiprocess browsing was launched under the codename Electrolysis in 2009, but it hasn't really progressed as rapidly as some had hoped.
Some of the technology behind Electrolysis is already in use in Firefox to isolate browser plugins like Flash, which fortunately means that users are insulated from the instability of such plugins. It will take a much larger effort to bring the feature to browser tabs on the desktop, however.
I discussed this issue with Mozilla VP Jay Sullivan during a phone briefing prior to the Firefox launch. He says that tab isolation probably won't be ready for Firefox 5 and will likely take a few cycles to get right.
Firefox 4 is available for download from Mozilla's website. It's not clear yet when it will be pushed through the automatic update system to existing 3.6.x users, but Mozilla usually waits a little bit before rolling out new major versions. For a full feature list, you can refer to the official release notes. If you are looking for some shiny Web content to test Firefox's new features, you might want to visit Mozilla's Web O' Wonder demo collection.

No comments:

Post a Comment