We have just released Aurora 9 (download and test Aurora 9), which is planned to be the upcoming Firefox 9. In it, we have a number of new things that we hope will get you excited!
Articles for September 2011
-
-
MDN vs. MSDN: Mozilla FTW
MindTouch, the developer of the software that powers the Mozilla Developer Network‘s documentation center, spent this week sponsoring a competitive battle, pitting MDN up against the Microsoft Developer Network (MSDN) site in the areas of user experience, social features, engagement, and findability. They offered their thoughts on the comparison between the two developer network sites in each of those categories, as well as overall, and then let their readers cast their votes on which they found superior in each area.
Today, MindTouch announced the result of their voting, and the Mozilla Developer Network site won in all categories (albeit by a slender margin in the “social” arena), as well as overall.
That serves as an affirmation that our open documentation model works, and works well. We have big plans for the future that will help make our content even better. Watch this space for news!
-
Congrats to our August Dev Derby winners!
For our August Dev Derby, we decided to see what developers could do with the History API.

We had 11 demos submitted and it was interesting to see how the History API creates new ways to interact with Web content.
After all the votes were in, we had our August Dev Derby winners!

1st Place: HTML5 Drawings by Cory Gackenheimer
2nd Place: Fly, fly! by Michal B.
3rd Place: Media Memory by Ian LunnRunners-up:
History Image Gallery
HTML5 Address Bar Video StatusThanks to everyone that participated in the August Dev Derby… if you want to experiment with Geolocation, you have one more day to join the September Dev Derby.
Otherwise, October is going to be an amazing month as we explore the possibilities with CSS Media Queries. Whether you’re on a desktop, tablet or mobile phone… show us what you can do to bring the Web to devices of all sizes.
-
Mozilla Hacks Weekly, September 29th 2011
Good Thursday, dear Mozilla Hacks readers! The Mozilla Developer Engagement Team has a new fresh list of reading suggestions for you!
-
What’s new for Web Developers in Firefox 7
Today we’re releasing Firefox Update 7. This update contains work that’s been stabilizing over the last 3 months and there are quite a few interesting things to talk about.
To be clear, this is not the canonical list of changes, just highlights. As always, we’ve created a page to track the changes that web developers will care about. For the full list please see the Firefox 7 for developers page.
Firefox now supports text-overflow: ellipsis
Firefox now supports the
ellipsismode for thetext-overflowproperty. This property is supported in other browsers which means developers should be able to start using it in the wild. Here’s an example of how text-overflow ellipsis works:HTML:
<html> <body> <div class="inner">I am some very long text!</div> </body> </html>CSS:
div.inner { width: 120px; text-overflow: ellipsis; white-space:nowrap; overflow:hidden; color: red; border: 1px dashed #333; margin: 20px; padding: 10px; }
Result:

As you can see, it’s pretty easy to make text that cuts off in a sane way with this new property. Our developer page for the property also contains sample syntax for other browsers.
WebSockets: Updated protocol and available on mobile
First, WebSockets is now enabled by default for Firefox for Mobile. For mobile networks that are high-latency and have high connection setup-up costs, WebSockets offers an opportunity to create a much better experience than is available with polling HTTP.
Second, we’ve updated to the most recent draft version of the WebSockets protocol from the IETF. Somewhat confusingly, this is version 8 of the protocol, but is draft version 10. This will be mostly of interest to people who are building applications on top of WebSockets and tool vendors, but is worth calling out since it affects backwards compatibility.
Since the WebSockets work is ongoing, the namespace for WebSockets remains moz-prefixed to indicate that it’s not yet finalized.
An even faster Canvas element
The
canvaselement in Firefox 7 is even faster. We’ve revised our code for Canvas based on what we learned in previous Firefox releases and how people are using Canvas in the wild. Based on that you are likely to see much snappier performance on many demos when drawing to canvas elements. For an example, see our Runfield demo.Web sites can no longer resize your main browser window
It’s no longer possible for a web site to change the default size of a window in a browser, according to the following rules:
- You can’t resize a window or tab that wasn’t created by window.open.
- You can’t resize a window or tab when it’s in a window with more than one tab.
Support for the new Navigation Web Timing Spec
Firefox Update 7 now supports the Navigation Timing spec. This allows a web page author to monitor parts of web page performance in the page itself. For people who are interested in page load and navigation performance, they can send that back to the server which can give them a better view into real-world performance.
There are a couple of other specs in this space – the User Timing and Resource Timing – but those are still under discussion in working groups and as such we have not yet implemented them.
-
Firefox 7: Telemetry
Based on a blog post originally posted here by Taras Glek, Firefox Developer.
Firefox 7 marks a turning point in how we measure Firefox performance. Traditionally we measured Firefox performance on individual developer machines and our build & release infrastructure. However it turns out synthetic benchmarks do not correspond to real-world Firefox usage: it is difficult to model a “typical” computer in a lab environment. Surprisingly slow consumer hardware, changes in usage patterns, preinstalled bloatware all affect Firefox performance in surprising ways.
Firefox 7 telemetry will prompt users to opt-in to reporting performance data to Mozilla. This data will supplement our existing benchmarking infrastructure to help us optimize future Firefox releases. Telemetry performance metrics are very lightweight and will not negatively impact Firefox performance.
In addition to transmitting data via SSL, Mozilla privacy team worked tirelessly to ensure that no personally-identifiable information is sent via telemetry. Whereas many other software projects stamp this kind of data with a unique per-user id, we opted for a per-session id which is reset every time the browser restarts. Telemetry is also disabled while in private-browsing mode.
The following telemetry data will be gathered in Firefox 7:
Memory usage
CPU core count
Cycle collection times
Startup speedUse the about:telemetry extension to check on your browser performance. The following screenshot shows how to enable telemetry:

I’m very excited that Firefox finally joins the ranks of cars, airplanes and other software projects in making performance decisions based on real evidence gathered in the wild.
-
Direct2D Azure hits Firefox 7
Based on a blog post originally posted here by Bas Schouten, Firefox Developer.
Hrm, Azure, what’s that again?
You can find out all about Azure other blog posts, there’s an introduction from Joe Drew and there’s several more in detailed posts discussing the Direct2D Azure backend and the performance implications to be found on my blog. The bottom line is that we’re working on a new graphics API that will be used for rendering in Gecko.
What does that mean for Firefox 7?
Well, we’re currently only using it with Direct2D and when using canvas. This allows us to stress test it, although a wide array of tests has been run, and it has been in use by our Aurora and Beta testers for a while now, there might still be issues we might have missed. If these issues show in the final release we’ll only have caused a regression in Canvas and for a limited subset of our users, rather than in all browser rendering. The bottom line is you should generally see a speed improvement using 2D Canvas in Firefox 7 when using Windows 7 or Vista with a sufficiently powerful graphics card.
So what’s next, what’s the status?
We’re currently working hard on both a Cairo and a Skia backend for the Azure API, this means we’ll be able to use the Azure API on all platforms. Possibly getting some quick performance benefits on platforms where Skia outperforms the cairo backends we’re currently using. At the same time we’re working on creating a layer that will allow controlled migration of all our content drawing code from the current ‘Thebes’ API’s to the new Azure API. Once that is done webpage rendering in general can start taking advantage of all the latest work!
That’s about all I have for you right now, enjoy!
-
Firefox 7 is lean and fast
Based on a blog post originally posted here by Nicholas Nethercote, Firefox Developer.
tl;dr
Firefox 7 now uses much less memory than previous versions: often 20% to 30% less, and sometimes as much as 50% less. This means that Firefox and the websites you use will be snappier, more responsive, and suffer fewer pauses. It also means that Firefox is less likely to crash or abort due to running out of memory.These benefits are most noticeable if you do any of the following:
- keep Firefox open for a long time;
- have many tabs open at once, particularly tabs with many images;
- view web pages with large amounts of text;
- use Firefox on Windows
- use Firefox at the same time as other programs that use lots of memory.
Background
Mozilla engineers started an effort called MemShrink, the aim of which is to improve Firefox’s speed and stability by reducing its memory usage. A great deal of progress has been made, and thanks to Firefox’s faster development cycle, each improvement made will make its way into a final release in only 12–18 weeks. The newest update to Firefox is the first general release to benefit from MemShrink’s successes, and the benefits are significant.Quantifying the improvements
Measuring memory usage is difficult: there are no standard benchmarks, there are several different metrics you can use, and memory usage varies enormously depending on what the browser is doing. Someone who usually has only a handful of tabs open will have an entirely different experience from someone who usually has hundreds of tabs open. (This latter case is not uncommon, by the way, even though the idea of anyone having that many tabs open triggers astonishment and disbelief in many people. E.g. see the comment threads here and here.)Endurance tests
Dave Hunt and others have been using the MozMill add-on to perform “endurance tests“, where they open and close large numbers of websites and track memory usage in great detail. Dave recently performed an endurance test comparison of development versions of Firefox, repeatedly opening and closing pages from 100 widely used websites in 30 tabs.[The following numbers were run while the most current version of Firefox was in Beta and capture the average and peak “resident” memory usage for each browser version over five runs of the tests. “Resident” memory usage is the amount of physical RAM that is being used by Firefox, and is thus arguably the best measure of real machine resources being used.]


The measurements varied significantly between runs. If we do a pair-wise comparison of runs, we see the following relative reductions in memory usage:
Minimum resident: 1.1% — 23.5% (median 6.6%)
Maximum resident: -3.5% — 17.9% (median 9.6%)
Average resident: 4.4% — 27.3% (median 20.0%)The following two graphs showing how memory usage varied over time during Run 1 for each version. Firefox 6′s graph is first, with the latest version second. (Note: Compare only to the purple “resident” lines; the meaning of the green “explicit” line changed between the versions and so the two green lines cannot be sensibly compared.)
Firefox 7 is clearly much better; its graph is both lower and has less variation.

MemBench
Gregor Wagner has a memory stress test called MemBench. It opens 150 websites in succession, one per tab, with a 1.5 second gap between each site. The sites are mostly drawn from Alexa’s Top sites list. I ran this test on 64-bit builds of Firefox 6 and 7 on my Ubuntu Linux machine, which has 16GB of RAM. Each time, I let the stress test complete and then opened about:memory to get measurements for the peak resident usage. Then I hit the “Minimize memory usage” button in about:memory several times until the numbers stabilized again, and then re-measured the resident usage. (Hitting this button is not something normal users do, but it’s useful for testing purposes because causes Firefox to immediately free up memory that would be eventually freed when garbage collection runs.)For Firefox 6, the peak resident usage was 2,028 MB and the final resident usage was 669 MB. For Firefox 7, the peak usage was 1,851 MB (a 8.7% reduction) and the final usage was 321 MB (a 52.0% reduction). This latter number clearly shows that fragmentation is a much smaller problem in Firefox 7.
(On a related note, Gregor recently measured cutting-edge development versions of Firefox and Google Chrome on MemBench.)
Conclusion
Obviously, these tests are synthetic and do not match exactly how users actually use Firefox. (Improved benchmarking is one thing we’re working on as part of MemShrink, but we’ve got a long way to go. ) Nonetheless, the basic operations (opening and closing web pages in tabs) are the same, and we expect the improvements in real usage will mirror improvements in the tests.This means that users should see Firefox 7 using less memory than earlier versions — often 20% to 30% less, and sometimes as much as 50% less — though the improvements will depend on the exact workload. Indeed, we have had lots of feedback from early users that the latest Firefox update feels faster, is more responsive, has fewer pauses, and is generally more pleasant to use than previous versions.
Mozilla’s MemShrink efforts are continuing. The endurance test results above show that the Beta version of Firefox already has even better memory usage, and I expect we’ll continue to make further improvements as time goes on.
-
Mozilla Hacks Weekly, September 22nd
It’s Thursday, and time for reading suggestions from the Mozilla Developer Engagement team!
-
Wiki Wednesday: September 21, 2011
Here are today’s Wiki Wednesday articles! If you know about these topics, please try to find a few minutes to look over these articles that are marked as needing technical intervention and see if you can fix them up. You can do so either by logging into the wiki and editing the articles directly, or by emailing your notes, sample code, or feedback to mdnwiki@mozilla.org.
Contributors to Wiki Wednesday will get recognition in next week’s Wiki Wednesday announcement. Thanks in advance for your help!
JavaScript
SpiderMonkey
Developing Mozilla
Extensions
XUL
- Using the Editor from XUL
- Creating a Windows Inno Setup installer for XULRunner applications
- Writing Efficient CSS for use in the Mozilla UI
XPCOM
Interfaces
Thanks to Neil Rashbrook for his contributions last week.
Plugins
CSS
Thanks to McGurk and Jean-Yves Perrier for their contributions last week.
SVG
HTML
Thanks to John Dyer and McGurk for contributing last week.
DOM
Thanks to Neil Rashbrook for his contributions last week.
- This is Page 1 of 3
- You're on page 1
- Go to page 2
- Go to page 3
- Next