| MadSci Network: Computer Science |
Hiya! This is quite an interesting question which, unfortunately, doesn't have such a simple answer. However, I will try... Firstly let's cover .htm and .html... These are completely equivalent. This is, I am afraid, just a "Bill Gates legacy" where in the "old days" you were only allowed to have three characters as the file extension. Originally most of the world wide web was kept on unix systems which allowed the extension .html, but when PC-based web servers came into being they had to chop off the "l" to get .htm All of the web browsers that I have used treat these two as equivalent. Now for .asp... One of the things that it is nice to do with web pages is to have them change depending on some condition such as time of day, input from an external source (such as information changing on the computer's hard disk) or from input from the user (usually by means of a form input). This is where it is nice to have a simple programming language which can work together with the plain html which is used to set out the page. This kind of programming can be done in two ways... 1) Client-side programming (this is usually referred to as scripting since simple programs running on unix systems were traditionally called scripts). Here the web browser receives a set of instructions (usually in javascript) and interprets them to perform operations such as moving buttons on the screen or making pull-down menus. There are many many scripting links on the net, but, for example, look at at http://www.thescripts.com/clientsidescripting/ The javascript here is usually embedded into the HTML and so you don't see any change in file extension in the URL. So the files just end in .htm or .html 2) Server-side scripting. In this case the script is interpreted by the web server itself. When the client calls for the page the server reads the script, interprets it (i.e., follows the instructions) and generates the web page, which it then sends to the client browser (such as Netscape or IE). In this case the script is usually written in ASP (active server pages), PHP (PHP: Hypertext Preprocessor (this is a kind of programming joke that the first letter stands for PHP)) or Perl. Again many many links can be found on the net, but if you are interested look at http://www.thescripts.com/serversidescripting/ Now the web pages are called by files which end in .asp, .php, .php4 or some others since the server needs to know what type of file it is dealing with. I hope this makes things (slightly) clearer. Best wishes, Phil. --- Dr. Phil Marsden -------------------------------------------------------------------------- Department of Microelectronics and Information Technology Laboratory of Quantum Electronics and Quantum Optics Royal Institute of Technology (KTH) Stockholm Email: phil.marsden@physics.org or phil.marsden@ieee.org Web: http://www.ele.kth.se/~phil --------------------------------------------------------------------------
Try the links in the MadSci Library for more information on Computer Science.