MozillaDeveloperPreview 3.7 alpha 4

Few weeks ago Mozilla released an alpha version of Firefox and I decided to try it. It’s MozillaDeveloperPreview 3.7 alpha 4.

I did a quick comparison for startup time between Firefox 3.6.3 and this preview. My firefox opens with 3 windows and a total of nearly 20 tabs:

3.6.3 3.7a4
First window displayed after 30 s 15 s
Completely loaded after 75 s 45 s

This new version starts much faster, but it’s still not fast enough for me. I like Safari on Mac because it starts very very fast, but when Firefox is loaded, it’s fast… while Safari freeze for few seconds from time to time.

  • Shutdown is also much faster.
  • Page rendering seems faster than Firefox 3.6.3.
  • Client identification (with SSL certificate) does not work anymore.
  • Acid 2 test passed.
  • Acid 3 test: 94/100.

There is something that has not changed yet, on my Mac Firefox is still using between 15 and 20 % of the CPU while it’s open, even when I’m not looking at Firefox (and it does not looks like any of the pages that are open is doing some fancy CPU eager things).

The WordPress plugin I’m using against SPAM not prevent me to login when using this preview version :-/.

Login/Password autocomplete

A feature I really like in most web browsers, is the ability they have to “remember” my login and password for a given website. And I like the way Firefox does that, by displaying a non-intrusive notification bar at the top of the page while loading the page:

(I don’t like the way Safari does, by putting a modal window. So I have to already answer if I want to save my credentials before being sure that I entered the right ones)

I really like this feature for several reasons. I think it’s more secure than having to type my password. Some people may disagree, but to me, having that feature allows me to set a different password on every website I have an account on. Without that feature I will use the same password everywhere which is a very bad idea. If I use the same password everywhere, if somebody finds out what my password is, he will have access to all my accounts. And this is way much more easier than you may think:

  • lots of websites does not do the login procedure on a secure connection so intercepting data is not that difficult, especially with non-secure WiFi / free WiFi access points
  • lots of websites/companies store your password in plain text in their databases, so mostly anybody working in that company at some point in time may see your password (and I’m not kidding, I’ve seen that myself several times (If I was a bad guy, which I’m not by the way ;-) , I would already be the owner of thousands of emails/logins/passwords))

An other reason why I think using the web browser’s password manager is more secure is because if at some point a malware installs a key-logger on your computer (which is not unusual on Windows computers), each time you type your password it’s a chance more for the key-logger to record it.

And of course, web browsers save your passwords in a crypted file (and not in a plain text file as some people do, which is also not really secure). To me, the biggest downside of this feature is that I can’t log in a lot of websites if I’m not using my computer because I don’t remember my passwords.

So there is something I really don’t like when surfing the web, is when I use websites where, for some reason, Firefox/Safari does not ask me to remember my password. Until recently I didn’t checked why, I was supposing that the login form was done in a way that web browsers did not recognized it as a login form (maybe because of an intensive use of javascript). But it looks like I was wrong on that, and that there are people stupid enough to call “feature” the ability of a website to prevent your web browsers to store your credentials.

From what I have seen so far, several web browsers disable the auto completion/password manager when the attribute autocomplete="off" is set on a form or input field. First of all: this attribute IS NOT STANDARD. It’s not part of any HTML/XHTML specification. It seems it was invented by Microsoft for Internet Explorer a long time ago (why bad ideas always come from the same guys? ;-) ).

There is a page on Mozilla’s developers website explaining how works the autocompletion and how to turn it off, and the page on autocompletion attribute on MSDN website.

The second point is: ok, Internet Explorer has this stupid feature, why other web browsers have also implemented it? The final decision has to be done by the user, not some manager of a website who thinks that he knows what you want better than you.

The only point I see where it may be useful, is that it also works for forms other than login forms. For login forms your web browser always ask you if you want it to store your login and passwords in a secure place. For other forms, the web browser remembers everything, in a place that may not be secure, and without asking you anything, which might be quite bad when filling a payment form with your credit card number. At this point, what would be useful, is a way to say to the web browsers that some data in the form are sensitive information (so the web browser may ask you if it should remember those data, and in that case put them in a secure place).

If you have followed until here, my point is: the autocomplete attribute sucks, it does not solve any problem and annoys me.

How to make those broken websites behave correctly again?

Several possibilities:

  • use a web browser that does not understand the autocomplete attribute (I don’t know which ones)
  • if you are using an open source web browser that supports that attribute, remove the support from the sources, compile, enjoy (that’s one of the freedoms of open source)
  • if you use Firefox, use Greasemonkey

First time I heard about Greasemonkey was several years ago, but for some reasons my neurons did not connect together at that time and I did not realized the power of this Firefox plugin, until I saw Paul’s demo at FOSDEM. Since then, I love that plugin. Simply said, this plugin allows you to fix websites :-) . First thing I did after installing it was to fix my bank website, which was forbidding me to go straight to the login page and was also forcing me to open the login page in an other tab/window. Greasemonkey allowed me to fix that with one line of code (really only one line, and a simple one in that case). Greasemonkey also has a lot of user contributed scripts for several websites (from that I found one fixing the download links on Jamendo (in order to download directly the OGG Vorbis version of an album (which is not possible from the website) and without opening a stupid download window)).

Something I love, on the scripts website, is the following sentence, at the bottom of the website: “Because it’s your web”.

How to fix the autocomplete attribute with Greasemonkey? My first try, was with my company’s Outlook Web Access (yes, unfortunately there are some people/companies actually paying for that), and guess what? Somebody already did a script for that: Allow Browser To Save Outlook Web Access Password.

So I was wondering: “do I have to do a script on every website that use autocomplete="off"”? I ended up, a few minutes after, with that script (note: I don’t know javascript at all, any comments to improve this script is welcomed):

// ==UserScript==
// @name           Turn ON autocompletion
// @namespace      http://desgrange.net
// @include        *
// ==/UserScript==
(function() {
	function turnAutocompleteOn(element) {
		if(element.hasAttribute('autocomplete')) {
			element.setAttribute('autocomplete', 'on');
		}
	}
 
	for(formKey in document.forms) {
		turnAutocompleteOn(document.forms[formKey]);
	}
 
	var inputs = document.getElementsByTagName('input');
	for(var i=0; i<inputs.length; i++) {
		turnAutocompleteOn(inputs.item(i));
	}
})();

It’s a bit brutal, on every pages you visit, it looks for all forms and all input tags having the autocomplete attribute and set it to “on”. I don’t know how often this autocomplete attribute is used, so I don’t know yet the side effects of doing that on every pages (that’s why I have not put this script on http://userscripts.org yet).

<video>, H.264, Theora, Firefox and patents

Some quick thoughts…

In HTML5 there is is new video tag allowing to embed a video in a web page as we do for a picture. As for the img tag (for pictures), the W3C (who defines HTML) does not say which format should be used for the content itself. So in a img tag you can put PNG, BMP, JPEG, GIF… whatever you want, as soon as it is recognized by web browsers.

Internet Explorer does not support video, Firefox supports it but reads only videos encoded in the Theora format, Chrome and Safari support the tag but read only H.264 encoded videos.

Technically, for the moment H.264 seems to be better than Theora. But Theora is an open format while H.264 is crippled with patents and using it requires paying huge royalties (depends of what kind of license but some people are talking about 5 million dollars).

I don’t remember seeing any “official” position from Mozilla why they do not support H.264 in Firefox, but from people working at Mozilla, they usually provide good arguments like:

  • the web is based on open, free and patent-free standards (this is very important, changing that will fragment the web)
  • they would prefer doing more useful stuff with 5 M$ than paying for a codec
  • supporting H.264 is not a good idea since it will be valid only for the version distributed by Mozilla, not the one embedded in your Linux distribution for example

I completely agree with that.

I wonder why lots of people on the internet would like Mozilla to support H.264 while they don’t ask Google and Apple to support Theora. For images, they are all able to read different formats, while should they be limited to only one video format? Google and Apple have nothing to pay in order to support Theora (except their developers to include it).

The other thing, why MPEG LA (licensing H.264) does not make H.264 a patent/royalty-free codec? OK, because MPEG LA was created to collect fees for patents covering MPEG technologies.

And the nasty idea, why Mozilla does not make a Firefox Europe Edition? In Europe, software patents are not allowed (kind of, it’s not really clear, it looks like quite often software patents are granted while they are not respecting european legislation). Doing a Firefox version including H.264 but distributed only in countries that do not allow software patents could be interesting. First in Europe, it may clarify what the status of software patents is, then it will hassle the MPEG LA and finally it may show to the US and US companies that they are not dominating the world and imposing their rules everywhere (and maybe make them change their patents laws (yes, sometimes I’m overly optimistic ;-) )).