Back in the 1990s, the web was dominated by static websites.
The first graphical web browser , Mosaic, was launched by in December 1995 by NCSA. Its main achievement was that it was also the first browser to display images inline with text instead of displaying images in a separate window. Though the web pages still remained static but more color could be added to them.
This small advancement in the rendering of the web pages led to the frantic rush in development and selling of advanced browsers. People wanted the guys who made Mosaic to create proprietary browsers for them.
Sensing the opportunity, one of the Mosaic developers, Marc Andreessen, founded the company Mosaic Communications Corporation and created a new web browser named Mosaic Netscape. To resolve legal issues with NCSA, the company was renamed Netscape Communications Corporation and the browser Netscape Navigator. The Netscape browser improved on Mosaic's usability and reliability - as well as boasting the then-impressive feature of being able to display pages as they loaded.
Within a year or so, Netscape was the browser of choice for the Internet users. It had almost 90% user base covered. But then entered Microsoft's Internet Explorer 1.0, which was bundled free of cost with the Windows OS. This started, what is called, the first browser war. Both the companies, in a desire to outdo each other, started implementing more and more features to their browsers.
But still the web pages were static. Netscape decided to put user interactivity to the web pages.
They hired Brendan Eich to develop a scripting language that could interface with the server-side components. Tasked with this, Eich eventually decided that a loosely-typed scripting language suited the environment and audience, namely the few thousand web designers and developers who needed to be able to tie into page elements (such as forms, or frames, or images) without a bytecode compiler or knowledge of object-oriented software design.