Spiria logo.

The Birth of JavaScript

February 14, 2014.

Whether you like it or not, JavaScript has carved out a place for itself in contemporary computing. It has become a bit of a must. But where does it come from? How did it go from being a second-rate language to one of the most widely used languages on the Web? What was its initial purpose? How did it evolve? What are its downsides? What are its qualities? What makes it different from other languages? I believe that to understand its raison d’être, we need to look back at its history.

I believe that to fully understand its raison d'être, we need to take a look back at its history.

The Internet was invented in 1974, but in the beginning it was mainly used to share information and to be able to always reach a destination no matter what route was used. In a cold war context, it had to be able to find the fastest way to reach a destination even if the topology of the network suddenly changed, like a bombed city. It was in 1983, with version 4 of the Internet Protocol, that we finally managed to create a version deemed "stable". But the Internet as most of the ordinary world knows it today appeared rather in 1993 with the first version of an obscure software called "World Wide Web". Invented at CERN, it is the first tool that allows rich documents to be represented graphically. It basically looked like this:


As you can see, this is the very beginning. In this version, they do not support nested images, it only works on a rather rare machine, the NeXT, the ancestor of Mac OS X, it is written in Objective-C, a little known programming language. If in its first year, it is mainly used to distribute static content to CERN researchers, quickly programmers, because of the simplicity of the protocol invented a first HTTP server that sends dynamically generated HTML files. Forms quickly appear in HTML2 to allow users to submit content to the server. But soon a problem is raised by developers. If an error was detected in a form, the entire form had to be sent back to the user and the user had to be notified of the error. Occupying server processor time and bandwidth, two very expensive things at the time.

Netscape then took the initiative in 1995 to write a programming language for its browser.

It was initially developed under the name "Mocha". Initially, it was to be a true more conventional language, oriented towards web pages. But the designers wanted a language targeted for people with little or no programming knowledge because at Sun Microsystem, they were working on integrating Java into the browser. So in his second proposal, the data types disappear, the syntax becomes very lax, many of the classic concepts of object-oriented languages disappear. But Brendan Eich decided to leave enough functionality in the language for professional programmers to find their way around. And eventually it appeared in Netscape 2.0 under the name "LiveScript". But in Netscape 2.0 Beta 3, it was renamed JavaScript, a corporate decision when Netscape made the decision to integrate Java into its web server, hoping that the combination of the two tools would create the first "distributed OS", the old term for "Cloud Computing".

The question that many programmers ask themselves when taking their first steps in JavaScript is how it went from being a second-order language to one of the most widely used languages on the Web.

In a word: Microsoft. If you've been in computer science as long as I have, you may have experienced the Microsoft Network. In 1994, at the dawn of the release of Windows 95, Microsoft decided to create its own version of the Internet, the Microsoft Network. Translated with www.DeepL.com/Translator (free version)


They do not use any of the current web technologies. It is essentially an emulation of CompuServe, a service available at the time. They offer news, weather, email, chat, forums. Everything is based on Microsoft technologies from A to Z. Even though the interface is very user-friendly, the only problem for Microsoft is that developers and users do not buy into it. The target customers for this type of service at the time were power users, academics. They need one very important thing: interoperability. These users need to interact with other users who don't necessarily have PCs. At the time, this market consisted of a variety of platforms, UNIX, NeXT, Macs, and more marginally, PCs running Windows.

In short, TCP/IP, HTTP, HTML won the battle for popularity because Mosaic, a browser developed by the University of Illinois, made the source code of its browser available under certain conditions. Mosaic is rapidly becoming available on literally all platforms. Microsoft executives seeing the potential of interconnected networks don't want to miss the boat. They decide to buy a license for Mosaic, rebrand it and release Internet Explorer. But in front of the popularity of Netscape, they feel obliged to implement all the functionalities of Netscape 2.0...

Including JavaScript.

At that time the language was not yet standardized by ECMA. Microsoft decompiled [1] Netscape and made a perfect implementation of JavaScript in record time. The fact that Microsoft made Internet Explorer 100% compatible with Netscape, the most popular browser at the time, made it a de facto standard.

Very quickly, Microsoft realized that it would not control JavaScript because Netscape had just begun the process of becoming an ECMA standard. Starting with Internet Explorer 3, Microsoft tries to redirect the market by integrating a new scripting language, VBScript. But the developer community is not following them. The use of VBScript will always remain marginal.

[1] Decompilation, or more roughly Reverse Engineering, is a process by which binary code is read by a human in order to recreate the logic used to generate binary code.