Use of JavaScript in LinkedIn

Harshal Kondhalkar
4 min readJun 25, 2021

--

JavaScript is a programming language used primarily by Web browsers to create a dynamic and interactive experience for the user. Most of the functions and applications that make the Internet indispensable to modern life are coded in some form of JavaScript.

The earliest incarnations of JavaScript were developed in the late 1990s for the Netscape Navigator Web browser. At the time, Web pages were static, offering little user interaction beyond clicking links and loading new pages. For the first time, JavaScript enabled animation, adaptive content and form validation on the page.

For many years, JavaScript only functioned on a limited number of browsers. Microsoft’s Internet Explorer, the largest browser base, did not support JavaScript until much later. Instead, Microsoft created its own proprietary client-side script called JScript. In the early days of Web development, programmers who wished to create dynamic websites were often forced to choose one browser family over the other. This was less than ideal because it made the Internet less universally accessible.

JavaScript did not become standardized and widely adopted until 1999. Even after standardization, browser compatibility remained an issue for over a decade.

How does JavaScript work?

JavaScript is what is known as a client-side script. Most Web applications, such as search engine, work because of an interaction between the user’s device (e.g. computer, phone or tablet) and a remote server. The software on the remote server sends information to the client (i.e. the user’s machine) and the software on the client side reads the information and renders a Web page on screen.

A client-side script is a programming language that performs its tasks entirely on the client’s machine and does not need to interact with the server to function. For instance, if you have a Web page loaded on your computer and your Internet service provider goes down, you are still able to interact with the Web pages already loaded on your browser. You will not, however, be able to navigate to new Web pages or access any data located remotely.

How does LinkedIn uses JavaScript?

LinkedIn

LinkedIn is the world’s largest professional network on the internet. You can use LinkedIn to find the right job or internship, connect and strengthen professional relationships, and learn the skills you need to succeed in your career. A complete LinkedIn profile can help you connect with opportunities by showcasing your unique professional story through experience, skills, and education. You can also use LinkedIn to organize offline events, join groups, write articles, post photos and videos, and more.

When the company sought to release an improved mobile application in 2012, they turned to JavaScript for both the front-end and back-end. By using a combination of HTML and native JavaScript code, LinkedIn’s development team was able to create a well-crafted application with a stunning user interface.

This professional networking platform is also among websites using Node.JS.

The server side of the LinkedIn mobile app was built by using Node.JS. They actually moved the back end of the mobile application from Ruby on Rails to Node. Two key reasons for this switch were efficient performance and scalability.

The Ruby on Rails app was a synchronous app that the clients used to make several calls for a single page. All of the calls occurred sequentially, with each thread handling a single request.

Node.JS allowed LinkedIn developers to move to an asynchronous event system where the client made a single request per page.

The result is as follows:

  • The company now uses 4 servers instead of 15.
  • The traffic capacity has doubled.
  • On the client side, the app works 2 to 10 times faster.

Advantages of JavaScript

  • Speed. Client-side JavaScript is very fast because it can be run immediately within the client-side browser. Unless outside resources are required, JavaScript is unhindered by network calls to a backend server.
  • Simplicity. JavaScript is relatively simple to learn and implement.
  • Popularity. JavaScript is used everywhere on the web.
  • Interoperability. JavaScript plays nicely with other languages and can be used in a huge variety of applications
  • Server Load. Being client-side reduces the demand on the website server.
  • Gives the ability to create rich interfaces.

Disadvantages of JavaScript

  • Client-Side Security. Because the code executes on the users’ computer, in some cases it can be exploited for malicious purposes. This is one reason some people choose to disable JavaScript.
  • Browser Support. JavaScript is sometimes interpreted differently by different browsers. This makes it somewhat difficult to write cross-browser code.

The way the three core structures of the internet works is by reinforcing each other to bring out the final effect of life. HTML provide the canvas, CSS provides the paint and the brush, and JavaScript provides immersion. Without JavaScript, browsing the web would be like browsing one giant art gallery with restrictions.

Thank-you!

--

--

No responses yet