CommonJS is an extension to the JavaScript scripting language that allows JavaScript to be used in environments other than a browser, such as on the desktop. The purpose of CommonJS is to extend JavaScript so that standard modules, libraries, and programming interfaces exist that are suitable for implementation in applications like web services, databases, and desktop applications.

Background and history[edit]

The scripting language JavaScript is typically used as a client-dependent language. JavaScript is interpreted by browsers, but can also be used on servers, for example, to send altered documents to the client or to place a cookie in the client browser. The problem: JavaScript could not be interpreted outside the browser environment. To fill this gap, the CommonJS Initiative was launched in early 2009.

Programmer Kevin Dangoor founded CommonJS as a project that was to benefit from the participation of many programmers. He suggested supplementing JavaScript with certain modules, extensions, and a standard library, as in other programming languages. JavaScript was to be usable in environments other than the browser as well.[1] The first modules were programmed one month after Dangoor’s invitation on the Internet. Currently, various modules, interfaces, and specifications are available to not only be able to use JavaScript client- and server-side, but also as a desktop application. CommonJS makes JavaScript more universal.

Known platforms that support CommonJS, include Narwhal and NodeJS.

Relevance to search engine optimization[edit]

Search engines usually have problems reading the source code of script languages. They cannot correctly interpret the code. However, Google is constantly working to improve the crawling of scripts. Since it is not entirely possible to get by without scripts in web design, some aspects of search engine optimization should be observed. If scripts are used to enhance the user experience, Google will likely not evaluate this negatively. Google can now read JavaScript.[2]

Nevertheless, the use of scripts in menus is often problematic because the menu tabs are also links. If a scripting language is used on the server-side, scripts should not instruct any diversions or redirections as this can be handled in an SEO-friendly fashion with the .htaccess file. Finally, script parts should be located at the end of the source code file. Since the actual content is loaded that way, the actual content is loaded first and crawling of the website is not a problem, at least until this point. Although CommonJS includes many enhancements that increase the functionality and flexibility of JavaScript significantly, from the perspective of search engine optimization use of it is still recommended only conditionally. If JavaScript is utilized, then only with the appropriate expertise.


  1. CommonJS effort sets JavaScript on path for world domination. Accessed on 01/08/2014
  2. Understanding Web pages better Accessed on 11/14/2015

Web Links[edit]