Content deleted Content added
ClueBot NG (talk | contribs) m Reverting possible vandalism by 122.52.84.11 to version by 188.11.123.248. Report False Positive? Thanks, ClueBot NG. (2706599) (Bot) |
No edit summary |
||
Line 4:
Client-side scripts are often embedded within an [[HTML]] or [[XHTML]] 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.
▲In contrast, [[server-side scripting|server-side scripts]], written in languages such as [[PHP]], [[ASP.NET]], [[Java (programming language)|Java]], [[Adobe ColdFusion]], [[Perl]], [[Ruby (programming language)|Ruby]], [[Go (programming language)|Go]], [[Python (programming language)|Python]], and [[JavaScript#Server-side JavaScript|server-side JavaScript]],<ref>{{cite web|title=Web technology survey: Usage of server-side programming languages for websites|url=http://w3techs.com/technologies/overview/programming_language/all|publisher=W3Techs.com|accessdate=9 December 2013}}</ref> are executed by the web server when the user requests a document. They produce output in a format understandable by web browsers (usually HTML), which is then sent to the user's computer. The user cannot see the script's source code (unless the author publishes the code separately), and may not even be aware that a script was executed. Documents produced by server-side scripts may, in turn, contain client-side scripts.
Server-side scripts require that their language's [[Interpreter (computing)|interpreter]] be installed on the server, and produce the same output regardless of the client's browser, [[operating system]], or other system details. Client-side scripts do not require additional software on the server (making them popular with authors who lack administrative access to their servers); however, they do require that the user's web browser understands the scripting language in which they are written. It is therefore impractical for an author to write scripts in a language that is not supported by popular web browsers.
|