Skip to main content

What's New in Firefox 21

By Craig Buckler



Free JavaScript Book!

Write powerful, clean and maintainable JavaScript.

RRP $11.95

Firefox has come of age. In version numbers, that is.

Firefox 21 was released on May 14, 2013. If you’ve not received the update, click Help > About Firefox > Check for Updates. Let’s look at the new features you can expect after installation…

<main> Element Support

The HTML5 <main> element was introduced earlier this year and represents the main content of the body of a document or application, i.e. perhaps a wrapper for an article and aside.

It’s simply a container tag and all browsers will render it regardless. Firefox “support” probably means it defaults to a block element rather than inline, but you’ll still require display:block; for other browsers.

Scoped Stylesheets

If you’ve ever included third-party content on your page, you may find it contains CSS code which pollutes your own styles. Scoped stylesheets restricts style rules to the enclosing container without the necessity to use an iframe, e.g.

	<p>This paragraph is the standard page color.</p>

	<style scoped>
		p { color: red; }
	<p>Only paragraphs within this aside element are red.</p>

Very useful. Unfortunately, only Firefox supports scoped CSS but IE11 and Chrome (and therefore Opera) should receive the technology soon.

Health Report

A preliminary implementation of the Health Report has been added to version 21. Non-personal Firefox data will be logged in the browser and to a central location including:

  • configuration details, e.g. hardware, OS, browser version, etc.
  • customization details, e.g. add-ons, plugins, options, etc.
  • performance data, e.g. timing of browser events, rendering, etc.
  • wear and tear data, e.g. session age, profile age, crashes, etc

Information is collated in the Health Report which allows you and Mozilla to determine performance issues. To view it, click Help > Firefox Health Report from the menu or enter about:healthreport in the address bar (wohh — I have 3,519 bookmarks … that explains a lot!)

Mozilla are monitoring your browser software rather than your activities or visited sites but, if you have privacy concerns, it can be disabled in the Health Report itself or in Options > Advanced > Data Choices tab > Enable Firefox Health Report.

Three-State Do Not Track

“Do Not Track” (DNT) is a W3C Recommendation implemented in most browsers. A DNT field is sent with every HTTP header which, if set to 1, means the site should prevent the user’s actions being tracked across two or more domains.

Firefox 21 introduces a new “Do not tell” option:

Do Not Track

The option removes the DNT header so a site is not aware of your preference. It’s a minor privacy improvement, but I suspect DNT isn’t being widely implemented at this time.

Social API

My heart sank when I saw this feature. Social media integration has never been successful; ask anyone who used the Flock or Rockmelt browsers. If I want to catch up with friends and colleagues, I can visit a social networking site or use an app — I don’t need Firefox to drip-feed a steady stream of inane drivel!

The Social API provides a sidebar which shows messages from Facebook. Or Cliqz, Mixi and msnNOW — yep — I’d not heard of them either?

Social API

According to Mozilla:

The Social API has endless potential for integrating social networks, e-mail, finance, music, cloud possibilities, services, to-do lists, sports, news and other applications into your Firefox experience.

I’m less convinced. Will it be different to loading a site in the sidebar? Will publishers use the feature if it’s only supported by one browser? Perhaps I’ll be proved wrong but, unless this becomes an HTML5 Recommendation, I’m cynical about its future.

Android Updates

Learn PHP for free!

Make the leap into server-side programming with a comprehensive cover of PHP & MySQL.

Normally RRP $11.95 Yours absolutely free

Firefox 21 on Android has received various HTML5 updates and now scores 421 out of 500 on

As well as the Gecko changes detailed above, the new mobile browser also provides:

  • integrated support for the Charis and Open Sans fonts which Mozilla claim is “a more visually appealing and clear reading experience on the Web”
  • the ability to save media files with a long tap
  • access to the recent history via the back and forward buttons
  • a newly-polished interface.

Admittedly, Firefox 21 is less exciting than previous releases but Mozilla continues to evolve the browser at a pace that makes Google look sluggish. See you again in six weeks for Firefox 22.

Craig is a freelance UK web consultant who built his first page for IE2.0 in 1995. Since that time he's been advocating standards, accessibility, and best-practice HTML5 techniques. He's created enterprise specifications, websites and online applications for companies and organisations including the UK Parliament, the European Parliament, the Department of Energy & Climate Change, Microsoft, and more. He's written more than 1,000 articles for SitePoint and you can find him @craigbuckler.

New books out now!

Learn valuable skills with a practical introduction to Python programming!

Give yourself more options and write higher quality CSS with CSS Optimization Basics.