What is JavaScript: The basics and history of JavaScript


What is JavaScript with two words: JavaScript was developed to display dynamic HTML pages via web browser. The processing of JavaScript is usually done directly on the client side through the web browser. JavaScript has very little in common with the Java programming language.

So what is JavaScript: The basics and history of JavaScript

JavaScript was originally developed by Netscape under the name LiveScript. The goal was to make dynamic HTML content executable and displayable in the web browser. JavaScript should allow to extend static HTML, interpret user actions, dynamically adapt content, or generate and reload content on demand.

Due to a co-operation with the company Sun Microsystems, which published its programming language Java 1995, the today common name JavaScript originated. However, there are only a few similarities between the two languages ​​Java and JavaScript.

The release year of JavaScript is also 1995. JavaScript was integrated into, at that time very popular web browser Netscape Navigator. Due to the rapid development of the Internet, JavaScript also spread very quickly. Today, JavaScript is one of the basic Internet languages ​​and is implemented in all major web browsers.

The independence of JavaScript from specific platforms has contributed significantly to its success. The language itself is very versatile and flexible. It has object-oriented properties and enables functional, object-oriented or procedural programming. JavaScript can not only be used on the client side in the browser, but can also be executed directly on servers.

Possible functions that can be implemented with JavaScript

With the help of the scripting language JavaScript many dynamic functions can be realized. Here are some examples of how to use JavaScript:

  • Dynamic change of web pages – for example, to display a formatted and updated date
  • Checking data entered in forms for plausibility
  • Display of marquees or banners
  • Open and display dialog boxes
  • Refresh data from a web page without reloading in the browser
  • Support of data input by the user
  • Change of texts or graphics by the mouse pointer

Differentiation of JavaScript to the programming language Java

Although Java and JavaScript have similar sounding names, the two languages ​​have little in common and are fundamentally different. Java is a full-fledged object-oriented programming language and not a scripting language like JavaScript.

The functionality and command set of Java are much larger. Java can be considered as a programming derivative of C ++ . With the help of Java it is possible to program independent applications.

JavaScript, on the other hand, is a scripting language and basically can not run on its own. The JavaScript scripts require an HTML environment. Originally, JavaScript was intended to be run on the client side by the browser. In the meantime, JavaScript can be used independently of the browser and executed, for example, on the server side.

Security aspects of JavaScript

With the many possibilities that JavaScript opens up, there are a whole range of security-related issues when executing the scripts. Many of them solve the so-called sandbox principle. The command lines are executed by the browser in a closed environment and only have access to the objects of the browser and not of the entire computer.

For example, access to the file system is prevented by the sandbox principle. Only for files that a user explicitly selects in a dialog box, read access is possible. In addition, the browser performs each website or Internet application isolated from each other. This prevents the data exchange and makes so-called cross-site scripting more difficult.

Certain functions such as closing browser windows, reading the clipboard or changing the browser start page are additionally protected by user-required entries. In order to prevent any manipulation attempts, JavaScript can be deactivated by the user in all common browsers. In this case, the browser no longer executes JavaScript commands contained in HTML documents.

Other issues related to JavaScript

Some website owners try to misuse JavaScript for their own purposes. For example, several pop-up windows are opened without user intervention or browser windows are closed. Other abusive functions are

  • the obfuscation of Internet addresses of individual links,
  • the disabling of context menus for saving and copying content or even
  • unwanted resizing of browser windows.

Many browsers therefore implement functions that suppress unwanted JavaScript functions or inform the user before they are executed. If JavaScript is completely deactivated in the browser, the corresponding web contents are completely ignored. If there are no HTML alternatives for the functions implemented by JavaScript, the usability of the affected pages can be significantly reduced.

Share This:

Powered by FrontNet