The term web server can refer to either the hardware (the computer) or
the software (the computer application) that helps to deliver web
content that can be accessed through the Internet.
The most common use of web servers is to host websites, but there are
other uses such as gaming, data storage or running enterprise
The primary function of a web server is to deliver web pages to clients.
The communication between client and server takes place using the
Hypertext Transfer Protocol (HTTP). Pages delivered are most frequently
HTML documents, which may include images, style sheets and scripts in
addition to text content.
A user agent, commonly a web browser or web crawler, initiates
communication by making a request for a specific resource using HTTP and
the server responds with the content of that resource or an error
message if unable to do so. The resource is typically a real file on the
server's secondary storage, but this is not necessarily the case and
depends on how the web server is implemented.
While the primary function is to serve content, a full implementation of
HTTP also includes ways of receiving content from clients. This feature
is used for submitting web forms, including uploading of files.
Many generic web servers also support server-side scripting using Active
Server Pages (ASP), PHP, or other scripting languages. This means that
the behaviour of the web server can be scripted in separate files, while
the actual server software remains unchanged. Usually, this function is
used to create HTML documents dynamically ("on-the-fly") as opposed to
returning static documents. The former is primarily used for retrieving
and/or modifying information from databases. The latter is typically
much faster and more easily cached but cannot deliver dynamic content.
Web servers are not always used for serving the World Wide Web. They can
also be found embedded in devices such as printers, routers, webcams and
serving only a local network. The web server may then be used as a part
of a system for monitoring and/or administering the device in question.
This usually means that no additional software has to be installed on
the client computer, since only a web browser is required (which now is
included with most operating systems).
Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply.