Today, a variety of services use server-side scripting to deliver results back to a client as a paid or free service. An example would be [[Wolfram Alpha|WolframAlpha]], which is a computational knowledge engine that computes results outside the clients environment and returns the computed result back. A more commonly used service is [[Google|Google's]] proprietary search engine, which searches millions of cached results related to the user specified keyword and returns an ordered list of links back to the client. [[Apple Inc.|Apple's]] [[Siri]] application also employs server-side scripting outside of a web application. The application takes an input, computes a result, and returns the result back to the client.
== Explanation ==
In the earlier days of the web, server-side scripting was almost exclusively performed by using a combination of [[C (programming language)|C]] programs, [[Perl]] scripts, and [[shell script]]s using the [[Common Gateway Interface]] (CGI). Those scripts were executed by the [[operating system]], and the results were served back by the web server. Many modern web servers can directly execute on-line scripting languages such as [[Active Server Pages|ASP]], [[JavaServer Pages|JSP]], [[Perl]], [[PHP]] and [[Ruby (programming language)|Ruby]] either by the web server itself or via extension modules (e.g. [[mod_perl]] or [[mod_php]]) to the web server. For example, [[WebDNA]] includes its own embedded database system. Either form of scripting (i.e., CGI or direct execution) can be used to build up complex multi-page sites, but direct execution usually results in less overhead because of the lower number of calls to external interpreters.
Dynamic websites sometimes use custom web application servers, such as [[GlassFish|Glassfish]], [[Plack (software)|Plack]] and [[Python (programming language)|Python]]'s "Base HTTP Server" library, although some may not consider this to be server-side scripting. When designing using dynamic web-based scripting techniques developers must have a keen understanding of the logical, temporal, and physical separation between the client and the server. For a user's action to trigger the execution of server-side code, for example, a developer working with classic ASP must explicitly cause the user's browser to make a request back to the web server. Creating such interactions can easily consume much development time and lead to unreadable code.
Server-side scripts are completely processed by the servers instead of clients. When clients request a page containing server-side scripts, the applicable server processes the scripts and returns an HTML page to the client.