A webserver is, conceptionally, a quite simple program. Whenever it receives a request for a file, it just opens that file on the server's hard disk and sends data down the wire. In addition to the actual data, it also sends some metadata, e.g "this is a GIF image. It was created last sunday and will be valid until next sunday"
When a webbrowser opens a page, it will just ask for the html. Once received, it will scan the html for links to images, etc. and call the server again for these items. All those requests are independent. The webserver does not know that it is the same visitor loading the images that was asking for the html first, and if there are many visitors to a site, it is more than likely that successive requests come from different visitors.
Server programs are just an extension of this scheme: when a request for a php or exe file is received, the server does not download the php text or program file, but rather runs the program. While sending data to a text or image file does not make much sense, a browser can send data to a server program - perhaps a search string or text to post in a guestbook or send in an email. When the program receives the request, it will create
some output, usually a html file, but possibly an image or a flash movie. A server script or program can also control the metadata sent with the output - the output of one php script may be htm text, while another one outputs gif image. In particular a server program can suggest caching behaviour
---------- Post added at 11:00 ---------- Previous post was at 10:58 ----------
**broken link removed**