> Because the mime decoding takes place at the server. This server is
> telling us the mime type is text/plain or text/html or something and we
> are dutifully sending that document to the external viewer which handles
> that type. The right solution is really to get the mime.types fixed on
> the server...
Yes, this is correct if the document is accessed via the HTTP protocol. This
is the only protocol of the common WWW ones which sends the MIME type of the
document to the browser as a header.
Other protocols in the WWW suite only send the document. When the browser
accesses the document using one of these protocols, it needs to determine
the MIME type based on other things, such as the file extension, first few
bytes of the file, or other things (gopher uses the second field of the path
to determine the MIME type.
Browsers have a table of mappings between file extensions and MIME types.
When they are unable to determine the MIME type from explicit headers, they
use this table. The table is generated differently on different platforms.
UNIX machines use .mime.types files, Windows and Macs probably have some
built in configuration mechanism.
At 10:10 PM 5/1/95, Number 6 wrote:
>
>I still don't geddit. When I transfer a file by binary mode FTP, as far
>as I am aware that file gets dumped wholesale, as-is, into a directory of
>my choice. However, if the file extension is recognised by Netscape (as
>.wrl for example), then it downloads the file and THEN spawns the
>appropriate viewer. I don't have that much experience of sgis, but I
>believe this to be the case with Windows Netscape. Please correct me if
>I'm wrong.
This is exactly right. The advantage of putting strange MIME type files on
FTP servers is that the server does not need to be reconfigured to serve
the file correctly. The disadvantage is that it is slower (all that login
overhead), and the browser still needs to be set up right. In any case, I
always use FTP servers while I'm waiting for the server to be reconfigured
with the new MIME type.
On Mon, 01 May 1995 17:39 Andy Norris wrote:
> It's not Netscape doing the recognizing. If it's being transferred by HTTP
> (as opposed to FTP), the first thing the server sends is a MIME header
> setting the file type. That w> ay if you have a CGI script such as
> http://www.foo.com/cgi-bin/form-processor.pl
> Netscape will recognize it fine, as long as the script sends the proper
> header.
> The reason the file extension is important is that unless there is a
> program generating the output (which generates it's own header), the
> server uses the file extension to determine what header to send.
Also correct. This is another way to generate custom headers without
reconfiguration of the server. However, IMHO, writing a script to add a
header to a document is overkill.
I hope this helps the confusion...
Chris
-- **Postgraduate Research Student in Collaborative Virtual Environments** /----------------------------------\ /--------------------------------\ | Chris Brown | Work Tel: +44 (0)115 951 4226 | | Communications Research Group | Fax: " " " 4254 | | Department of Computer Science | Home Tel: " " " 5387 | | University Park | Fax: " " " 5355 | | Nottingham NG7 2RD, ENGLAND | Email: [email protected] | \----------------------------------/ \--------------------------------/