Client-side scripting: Difference between revisions

Content deleted Content added
m Reverted edits by Prasad 98 (talk) to last version by FourViolas
Bkt64 (talk | contribs)
m gave a description of what XHTML is
Line 2:
'''Client-side scripting''' generally refers to the class of [[computer program]]s on the [[World Wide Web|web]] that are [[Execution (computers)|executed]] ''[[client-side]]'', by the user's [[web browser]], instead of ''[[server-side]]'' (on the [[web server]]).<ref>[http://www.w3.org/TR/WD-script-970314 Client-side Scripting and HTML]. W3.org. Retrieved on 2012-09-11.</ref> This type of [[computer programming]] is an important part of the [[Dynamic HTML]] (DHTML) concept, enabling [[web page]]s to be [[Script (computer programming)|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]] or [[XHTML|XHTML ('''Extensible Hypertext Markup Language)''']] document (hence known as an "embedded script"), but they may also be contained in a separate [[Computer file|file]], to which the document (or documents) that use it make reference (hence known as an "external script"). 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]] [[Execution (computers)|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 in response to certain user actions, (e.g., clicking a button). Often, these instructions can be followed without further communication with the server. Balancing the execution between client and server scripts is used to minimize the communication load, server load and/or response time.
 
By viewing the file that contains the script, users may be able to see its [[source code]]. Many web authors learn how to write client-side scripts partly by examining the source code for other authors' scripts.