Client-Side
Scripting
In this technique, one uses the
user’s browser to checking the form data. If data is missing or is incorrect,
the browser can prompt the user to take corrective action.
This way, the form data is sent
to the server-side script only after it has been established that the collected
data is complete and correct.
Server-Side
Scripts: Review
Are programs that reside on Web
servers receive info that a user enters in a form process that info and take
appropriate action.
Examples:
CGI scripts on Unix servers
ASP scripts on Windows servers
New Concept:
Client-Side Scripts
Small programs that are a part of
the Web page and run on the user’s (client’s) computer
They interact with the user to
collect info or to accomplish other tasks.
Once it has been collected, they
may help pass the collected info on to a server-side script.
We’ll use JavaScript to do
client-side scripting. However, there are many other languages that can be used
for that purpose, e.g. VBScript.
Advantages of
Client-Side Scripting
Reduced server load as it does
not have to send messages to the user’s browser about missing or incorrect data
Reduced network traffic as the
form’s data is sent only once instead of many to’s and fro’s.
Disadvantages
Client-side scripts do not work
with all browsers.
Some user intentionally turns
scripting off on their browsers.
This increases the complexity of
the Web page, as it now has to support both situations:
Browsers with scripting
capability, and those not having that capability.
No comments:
Post a Comment