Main Page | See live article | Alphabetical index

Server-side scripting

Server-side scripting is a web server technology in which a user's request is fulfilled by running a script directly on the web server to generate dynamic HTML pages. It is usually used to provide interactive web sites that interface to databases or other data stores. This is different from client-side scripting where scripts are run by the viewing web browser, usually in JavaScript. The primary advantage of server-side scripting is the ability to highly customize the response based on the user's requirements, access rights, or queries into data stores.

VBScript is used for both server-side and client-side scripting, but primarily server-side. This version of Visual Basic is supported primarily on Microsoft platforms.

In the "old" days of the web this was almost exclusively performed using a combination of C programs, Perl scripts and Shell scripts using the Common Gateway Interface (CGI). Those scripts were executed by the operating system, and the results simply served back by the web server. Nowadays full in-line scripting languages such as ASP and PHP have been developed that are executed by the web server itself, or by extension modules to the web server. Either form of scripting can be used to build up complex multi-page sites, but direct execution usually results in lower overhead due to the lack of calls to external interpreters.

Dynamic websites are also sometimes powered by custom web application servers, for example the Python "Base HTTP Server" library, although some may not consider this to be server-side scripting.

See also content management systems (CMS).