For a long time I’ve been a huge fan of the Firefox browser. But if I’m being honest, it’s starting to piss me off.
Wikipedia states: “To display web pages, Firefox uses the Gecko layout engine, which implements most current web standards in addition to a few features which are intended to anticipate likely additions to the standards.” This sounds all fine and good, but it doesn’t mention than Firefox allows code to fail “gracefully”.
Why is that a bad thing? In almost every web application, “failing gracefully” is something developers strive for. The idea is that your application (or website) won’t crash when it encounters an error and that the user can continue using your software without losing data or having to restart.
In Firefox, I see this as bad because it is actually encouraging web developers to be lazy. Rather than actually enforcing the standards it claims to implement, Firefox doesn’t tell you anything is wrong and makes you believe you’ve done a good job. Because web developers currently rely on a variety of plugin tools (most notably Firebug), a lot of code goes unchecked in Internet Explorer, Safari and other browsers simply because it works fine in Firefox.
Here’s two great examples how Firefox fails to enforce web standards.
JavaScript
Firefox doesn’t throw syntax errors in JavaScript when it should (e.g. missing semicolons, trailing commas). Some people will say this is nice because the code continues to run, but the fact is that the developer has learned NOTHING and will continue making the same mistakes. Syntax errors break your application in other browsers (namely Internet Explorer, but others too).
Think of it this way: if your Python, C++ or JAVA code had a syntax error, your code would never even compile let alone run. Why should Firefox allow your JavaScript code to run when syntax errors can cause huge problems?
Regular Expressions
I recently noticed that a regular expression I wrote a while back works in Firefox but not in Internet Explorer. What was the problem? I was searching for a lower-case “h” when I should have been looking for an upper-case “H”. Firefox allowed that code to run, but Internet Explorer returned the true result (in my case: null). My code was incorrect, but Firefox didn’t tell me. Again, had this been C++ or JAVA my application would have failed.
I have other problems with Firefox (like memory leaks), but I think you kind of get the point.
Now before I get tons of nasty emails, I should say that other browsers also fail to enforce web standards. Internet Explorer has a well-documented history of not displaying HTML and CSS code correctly, and it can’t go without being chastised. Safari and others have also had their issues.
The bottom line is that Firefox returns false positives. It pats you on the back for terrible code, and someone (other than me) needs to take notice.
