How JavaScript became popular—part 1

Google Chrome precipitated the JavaScript revolution

In the beginning (1995), JavaScript was used only to add a little functionality—usually superficial—to web pages. Its usage gradually increased. If you are one of the older people, maybe you remember your jaw dropping around 2005, when you first saw Google Maps—the first popular application that used a technique known as AJAX. But the story of the modern JavaScript revolution starts three years later with the release of Google Chrome and its JavaScript engine.

The JavaScript engine is the part of the browser that executes JavaScript. I like the term “engine” because it avoids questions concerning the difference between interpreters and compilers. Every browser has a JavaScript engine: Firefox’s is called SpiderMonkey and Safari’s is Nitro. Chrome, Edge and Opera all use the same JavaScript engine, V8, originally released as part of Google Chrome in 2008.

What was notable about Google Chrome and V8 was that it was fast. It analyzed the program and compiled the parts that could be compiled, running them in native speed. It also used many other optimizations. Chrome’s competitors soon copied these features, and today all JavaScript engines are equally fast. A few months ago I made some tests and I was surprised to see that, in many cases, JavaScript is five times faster than Python (although still much slower than pure compiled languages such as C).

The next milestone was the creation of “Node.js” in 2009. But this is a story for next time.