Introduction & Client-side Scripting
Scripting languages are used to create dynamic web pages.
It is classified into two main categories.
1) Client-side Scripting
Client-side scripting is used for validation of data at the client-side, reducing the workload on the serve
It provides quicker response to users and allows the client browser to share some of the burden on the
Popular client-side scripting technologies include JavaScript and VBScript.
Advantages of Client-side Scripting
• Quicker response to users
• Reduces workload on the server
• Allows client browser to share burden on the web server
Disadvantages of Client-side & Intro to Server-side Scripting
Disadvantages of Client-side Scripting:
• Some browsers may not support script
• Users may turn off script execution in the browser
2) Server-side Scripting
Server-side scripting is used to create dynamic web pages and connect to databases.
It is executed on the server-side, and the output is sent to the client browser in the form of an HTML pa
Popular server-side scripting languages include Perl, PHP, ASP and JSP.
Advantages & Disadvantages of Server-side Scripting
Advantages:
• Can connect to databases and return data from the web server
• Not affected by the type and version of the web browser
• Cannot be blocked by users
Disadvantage:
• Consumes server resources
Client-side vs Server-side Scripting (Comparison)
Feature | Client-side Scripting | Server-side Scripting
----------------------|----------------------------|-----------------------------
Execution | In client browser | On web server
Purpose | Validate client-side data | Connect DB, return data
Browser Support | Affected by browser type | Not affected by browser
Resources | Uses client resources only | Uses server resources