Jump to content

Client-side scripting

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 122.52.84.11 (talk) at 03:43, 12 July 2016. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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).Cite error: A <ref> tag is missing the closing </ref> (see the help page). 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. MANNY PACQUIA IS SO GWAPO VERY GWAPO...

Server-side scripts require that their language's 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.

Due to security restrictions, client-side scripts may not be allowed to access the user's computer beyond the web browser application. Techniques like ActiveX controls can be used to sidestep this restriction.

Client-side scripting is not inherently unsafe. Users, though, are encouraged to always keep their web browsers up-to-date to avoid exposing their computer and data to new vulnerabilities. Some users disable script execution because of fear of exploits or to pursue faster browser experience, thus limiting the usefulness of this scripting technique.

The latest group of web browsers and web pages tend to employ a heavy amount of client-side scripting, accounting for an improved user interface in which the user does not experience the unfriendly "refreshing" of the web page, but instead sees perhaps an animated GIF file indicating that the request occurred and the page will be updated shortly. Ajax is an important addition to the JavaScript language, allowing web developers to communicate with the web server asynchronously in the background without requiring a completely new version of the page to be requested and rendered. This leads to a much improved user experience in general.

Unfortunately, even languages that are supported by a wide variety of browsers may not be implemented in precisely the same way across all browsers versions and operating systems. Authors are well-advised to review the behaviour of their client-side scripts on a variety of platforms before they put them into use.

An especially easy to learn and use example is iMacros. Another increasingly popular use is the augmented browsing that gives the user more control over how web content is displayed to him. See Greasemonkey for a popular extension.

References