You may have created several webpages using HTML and CSS, where HTML helps in document content and structure while CSS provides presentation styling for a Web page. Most of the webpages are viewed in web browsers by the users or we may call them as Clients. To control browser actions associated with a Web page, Client-side scripts may be used in addition to the HTML & CSS. Scripts are the programs written in a simple and easy-to-use language to specify control of other programs. In Webpages, Client-side scripts are mostly written in the JavaScript language to control web browsers actions. Various tasks associated with client-side scripts may include the following:
With the use of client-side scripts, Web pages may turns into more dynamic and more responsive. For user interface purposes, JavaScript is used in combination with other Web constructs like HTML, CSS etc. The emphasis is in applying JavaScript in practice rather than studying it as a programming language.
Server-side scripting is a technique of programming for producing the code which is used to run software on the server side, in simple words any scripting or programming that can run on the web server is known as server-side scripting. The operations like customization of a website, dynamic change in the website content, response generation to the user’s queries, accessing the database etc etc are performed at the server end and Server-side scripting may be used to accomplish such tasks.
As stated above, the scripts may be written in two forms, at the server end (i.e back end) or at the client end (i.e. user end). The main difference between server-side scripting and client-side scripting is that the server side scripting involves server for its processing while client-side scripting requires browsers to run the scripts on the client machine but do not interact with the server while processing the client-side scripts.
JavaScript is a lightweight (i.e. simple in processing), cross-platform and interpreted scripting language. JavaScript is one of the most popular scripting languages used for the development of web pages along with several non-browser environments (they also use it).
JavaScript contains a well-built standard library of objects, like Array, Date, Math etc, and a core set of language elements like operators, control structures, and statements. Now a days, Java Scripts may run on both Client as well as server side.