WebScripting is the process of creating and embedding scripts in a web page.
A script is a list of commands embedded in a web page. Scripts are interpreted and executed by a certain program or scripting engine.
Scripts may be written for a variety of purposes such as for automating processes on a local computer or to generate web pages on the web.
There are two types of scripts:
Client-side scripting enables interaction within a web page.
The client-side scripts are downloaded at the client-end and then interpreted and executed by the browser.
The client-side scripting is browser-dependent. That is, the client-side browser must be scripting enabled in order to run scripts.
Client-side scripting is used when the client-side interaction is used.
Uses of client-side scripting may be:
Server-side scripting enables the completion or carrying out a task at the server-end and then sending the result to the client-end.
In server-side script, the server does all the work, so it does not matter which browser is being used at client-end.
Server-side scripting is used when the information is sent to a server to be processed at the server-end.
Uses of server-side scripting may be:
The table given here compares or tells the differences between the client-side and the server-side scripts:
|Client-Side Scripting||Server-Side Scripting|
|Script code is downloaded and executed at client end||The script is executed at the server-end and the result is sent to the client-end|
|Response to interaction is more immediate once the program code has been downloaded||Complex process are more efficient as the program and associated resources are not downloaded to the browser|
|Services are secure as they do not have access to files and databases||Have access to files and data bases but have security considerations when sending sensitive information|
|Browser dependent||Does not depend on browsers|
|Affected by the processing speed of user's computer||Affected by the processing speed of the host server|