What is client-side scripting?

Before jumping into client-side scripting, first we will see a short intro about script.

What is a script?

Script is a small embedded program. Popular scripting languages are Javascript, VBscript etc.,

HTML is not a scripting language because it does not have <script> tag. We need to use <script> tag to generate a script. </script> is used to end the script.

The type attribute in script specifies the type of language we are using. We can also use language attribute.

//type attribute
<script type = “text/javascript”>
     document.write(“TutorialRide”);
</script>
//language attribute
<script language= “javascript”>
     document.write(“Abaython”);
</script>

Client-side scripting:

Client side script is a small program embedded into your web page. Client-side scripting means ‘happening inside your browser’. Here scripts are executed on the browser without connecting to server. When the server sends the script along with HTML webpage to the client, the script runs on client’s browser either while page is loading or after page is loaded.

It is a technique for enhancing the interactivity of online web pages.

It is widely useful in creating dynamic user interface components like pull-down menus, navigation tools, animation etc.,

Its helpful in making the webpage user-friendly.

So, HTML, CSS and JavaScript all are client-side. They are stored on the server like files, but it’s the responsibility of the browser to do anything with them.

JavaScript is used to create dynamic and responsive webpages.

Benefits:

  • Client side scripting is quite easy to learn with minimum programming knowledge.
  • It is light weight and easy to implement. Editing and executing code is fast.
  • Data processing is done on client side from server so it is easy to scale applocations  for large set of users . Reduces workload on server.
  • Execution of client side script is quick as it done on client browser.

Limitations:

Main problem is security as the code is sent as it is. It is usually visible. Not suitable for sensitive data transmission. The web application based on the heavy JavaScript can be complicated to debug and maintain. Running of script depends on browsers configuration and security level. More limited functionalities.