U
Uncle Pirate
Jan said:On the www the HTTP protocol defines an HTTP "Content-type" header that
is supposed to tell your browser what kind of content it is about to
receive.
As far as I know, the content type is only for the browser, being sent
by a server. The servers I manage process many things according to file
extension. It is configured so that an html or htm extension is sent
using http or https, anything in the cgi-bin disregards extension
processing anything there as a CGI program. Then, being a school and
teaching CGI, CGI is enabled for the users to run in their directories
if the file has a cgi extension. The server knows to parse for PHP if
the extension is php. And so on. Anything not defined is handled as
plain text.
So, in speaking about browsers only, no, the browser doesn't require
file extensions. The server does though, so it expects the browser to
ask for files by extension.
Given correct server config, the all too common .html (or even worse,
the .htm) extension is totally redundant.
If you are talking about configuring by directories. But then, how do
you handle other types of files? The server handles files the way it is
told so if you set a directory to handle all files as HTML, then all
graphics would have to be in a different directory configured to handle
things as graphics.
That's a browser, the server has to know how to handle the file and theEven MSIE understands at least the basics of that part.
easiest way is to configure it to handle files based on extensions and
very little based upon locations.
--
Stan McCann "Uncle Pirate" http://stanmccann.us/pirate.html
Webmaster/Computer Center Manager, NMSU at Alamogordo
Coordinator, Tularosa Basin Chapter, ABATE of NM; AMA#758681; COBB
'94 1500 Vulcan (now wrecked) http://motorcyclefun.org/Dcp_2068c.jpg
A zest for living must include a willingness to die. - R.A. Heinlein