How browsers support JavaScript frameworks

The most important thing you need to know about this topic could seem quite shocking: browsers are not supposed to support JavaScript frameworks. Basically, a browser must support only the ECMAScript standard (for its JavaScript engine) and the DOM specifications (for its DOM engine). Everything else is a plus. In other words, a JavaScript framework works because of the efforts of its developers for making it compatible with the greatest variety of browsers, not because browser implementors have tested this framework.

It's practically impossible for browser implementors to test extensively all the existing JavaScript frameworks. Even with a new browser release, this kind of tests (or regression tests) never take place. It's up to JavaScript coders to test their frameworks with the new browser release and fix bugs whenever they occur. So if your favorite framework shows some obtuse bugs in a newer browser release, you'll basically need to wait until these bugs will be fixed by the team that actually develops that framework. I know this it's hard to accept, but this is how things work with browsers.

In defense of browser implementors

After several years of web development, plus two years of C++ programming, I have to confess that I do not understand why web developers sometimes blame browser implementors. In many web tutorials is repeated the expression "it's not rocket science" to denote something that's easy to understand and use effectively. Well, implementing a web browser is something very similar to rocket science, in the sense that we're talking about extreme complexity here, not some fancy effects that you can achieve with some jQuery's plugin.

We're talking about thousands and thousands lines of code, broken down in several components and subcomponents, something that, if downloaded, occupies hundreds megabytes of disk space. We're talking about the inner interaction of components with each other, something that from a simple URL resolution and DNS querying leads to a complete page layout. We're talking about network interfaces, memory management, OS interfaces, interface design, web standards implementation (from parsing to rendering), user interface, widgets, extensions and so on.

What's more, how these web developers who criticize implementors would implement web standards themselves? It's easy to write float: left but it's incredibly harder to make it properly work on a web page. It's easy to use jQuery on our documents, but let's stop just a second and think about how much efforts are required to make $('#test + #foo') select its target element. Now they may say: "Well, this is not our job.". Sure, but why don't you try to help instead of complaining? Why don't you create some useful test case for filing a bug? Why don't you try to analyze a broken web site and report it? Never complain: cooperate.

This is probably the strongest post I've ever written on this blog but I do believe that cooperation is the only way to get the results we all want: better browsers, better sites.

Browser statistics: the Chrome's momentum

Recently I consulted the Google statistics about this blog. Browser stats are reported in the following table:

Browser statistics of the last two months
Browser Visits % visits
Firefox 925 48.58%
Chrome 452 23.74%
Safari 193 10.14%
Internet Explorer 166 8.72%
Opera 57 2.99%

First Firefox, last Opera. More surprising is the still relevant percentage of Internet Explorer users, with 166 visits. I don't know which version of IE they're actually using, though. Second and third are Chrome and Safari, respectively. This shows how Chrome is gaining its momentum among web developers and web users.

Browser stats for this blog

The following chart summarizes the current browser stats for my blog:

As you can see, the most used browser is Firefox, followed by Chrome, Safari and Internet Explorer. I don't know which versions of IE are currently in use, though. If you're an IE user, please post a comment and specify your browser version. It would be interesting to know how IE loads and renders my pages.