Script

Scripts are written in programming languages called scripting languages. The most commonly used scripting languages are JavaScript, PHP, ASP, VBScript, PERL, and JSP.

There are mainly two types of scripts, clients-side or frontend scripts, and server-side or backend scripts.

 

Client-side Script

  • Handles interaction within the web page; they are downloaded at the client end, interpreted, and then executed by the system’s default browser.
  • It is dependent on the browser to run scripts; that is, scripting must be enabled on that browser
  • It is used when there is interaction in the frontend. For example, for playing online games, getting data from the browser or user screen, and customizing the browser’s display of a page without having to reload or reopen it.

Frontend scripting languages commonly used are JavaScript, VBScript, and PHP

 

Server-Side Script

  • This handles executing tasks at the backend and sending the result to the frontend.
  • The client browser is not important as the server carries out the tasks
  • Server-side scripting is used when some information is sent to be processed, like for processing forms, customizing browsers, password protection, dynamic web page editing, building and displaying pages from a database

Popular server-side scripting languages include Java Server Pages, Active Server Pages, Perl, and PHP.