W3C home > Mailing lists > Public > www-html@w3.org > January 2003

Re: HTML or XHTML - why do you use it?

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 07 Jan 2003 18:01:25 -0500
Message-Id: <200301072301.SAA27233@nerd-xing.mit.edu>
To: "Peter Foti (PeterF)" <PeterF@SystolicNetworks.com>
cc: "'www-html@w3.org'" <www-html@w3.org>

> I'm curious... how does the OS determine which program to open the file with
> if there is no extension?  For example, if I have three files:
> 
> textfile
> htmlfile
> binaryfile
> 
> how does the OS know that I want to open textfile with a word processor,
> htmlfile with a user agent, and binaryfile with some other associated
> program?

On MacOS, each file has a type and creator associated with it, stored in
the filesystem.  The creator identifies the application the file should be
passed to, essentially.

On BeOS, each file has a MIME type associated with it, stored in the
filesystem.  The MIME type is used to look up the application that can handle
that file.

On Unix, the 'file' program is commonly used (when combined with a magic number
file that maps to MIME types that gives you a setup similar to BeOS).

Boris
-- 
Economists state their GNP growth projections to the
nearest tenth of a percentage point to prove they have a
sense of humor.
                             -- Edgar R. Fiedler
Received on Tuesday, 7 January 2003 18:01:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:53 GMT