Client-Side Scripting

Client-side scripting generally refers to the class of computer programs on the web that are executed client-side, by the user's web browser, instead of server-side (on the web server). This type of computer programming is an important part of the Dynamic HTML (DHTML) concept, enabling web pages to be scripted; that is, to have different and changing content depending on user input, environmental conditions (such as the time of day), or other variables. Client-side scripts are often embedded within an HTML document, but they may also be contained in a separate file, which is referenced by the document (or documents) that use it. Upon request, the necessary files are sent to the user's computer by the web server (or servers) on which they reside. The user's web browser executes the script, then displays the document, including any visible output from the script. Client-side scripts may also contain instructions for the browser to follow if the user interacts with the document in a certain way, e.g., clicks a certain button. These instructions can be followed without further communication with the server, though they may require such communication. This is good for people who are surfing websites and clicking buttons to jump to different pages on a website. The pro side to client-side scripting is the user can upload things from there end using the scripting done on the HTML page created for them. The downside is, unlike Server-Side Scripting where multiple things as queries can be done, the user is only able to do one thing, pertaining to what they are doing. Clients may have to download certain plug-ins to view certain websites.

 

Example of Client-Side Scripting

If you look at this picture taken at the macromedia website for the upgrade center, you will see there are links everywhere, thus based for the user to different areas of the websites, as the definition above says about clients seeing what is available to them on their browser windows, the code generated for this website shows the user what is to be shown to them.

 

Click here to go back to Server Side Scripting