Re: <ot>Setting up a hyper text link to a binary file</ot>
From: Mikko Kurki-Suonio <maxxon@s...>
Date: Wed, 8 Apr 1998 09:56:08 +0300 (EET DST)
Subject: Re: <ot>Setting up a hyper text link to a binary file</ot>
On Tue, 7 Apr 1998, Tim Jones wrote:
> IIRC Netscape had a section in their help system I found that stated
> something like the above about http: protocol for their browser.
I wouldn't have expected anything less from them... if the IT business
ever dries up, their attitude will make them brilliant politicians or
lawyers.
> True your server has to support the other transmission protocols ftp:
> file:, gopher: which may not be the case so...
It may not even go to the same server (program)... and the use of file:
(technically obsolete equivalent of ftp:) for non-local files is
*depreciated* these days.
> If you zip your spreadsheet and set the link to file using
> http://myserver/thing.zip transmission
> protocol it's more likely to work as you want.
That's good advice. The "problem" here, if you want to see it as a
problem, is that HTTPd servers (IIS included), don't come with common
Micro$oft file extensions premapped. (Zip isn't M$, so it usually is
premapped.)
> Setting the MIME type in the browser doesn't always work as you
expect.
> For example I have MIME type application/msword defined for all file
> .DOC and to launch MS word as an action. But trying to get a file by
> http://my_server/~docs/example.doc from the local server doesn't
launch
> MSword as expected but reads the binary file as html. Which is the
symptom
> I think people were reporting for the spread sheet.
>
> I'm a Netscape user IE3/4 may behave differently.
That has nothing to do with it. This is a *very* common misconception.
The browser-side mappings are used ONLY if the server does not supply
a MIME type. But HTTP spec indicates that a server MUST supply a MIME
type -- if doesn't know explicitly, it is *required* to guess or use a
default value.
What happens is this: The server gets a request for xyzzy.doc. It checks
its MIME mapping, doesn't find .doc and slaps on the default
"text/plain". The browser gets back a file tagged as "text/plain" and
that's the way it will be displayed. The browser *can't* make "educated"
guesses based on the original URL.
Why? Consider a CGI program, "xyzzy.exe". If the browser made an
educated
based on the .exe extension, you'd never get the CGI program to return
anything but application/octet-stream...
> >Short of that, you can also hope
> > that more people would learn to use their right mouse button...
>
> To do what exactly?
To invoke "Save target as..." or equivalent (or however it is done in
one's fave browser).
You see, it's like this: You have this nifty camping utensil called
spoon-fork, because it has a spoon end and a fork end -- the idea being
that the most suitable end is used for each cuisine.
Then you have loads of people trying to eat soup with the fork end,
blaming the *cook* and asking: "Could make it a bit thicker?"
--
maxxon@swob.dna.fi (Mikko Kurki-Suonio) | A pig who doesn't
fly
+358 50 5596411 GSM +358 9 80926 78/FAX 81/Voice | is just an ordinary
pig.
Maininkitie 3C14 02320 ESPOO FINLAND | Hate me? | - Porco
Rosso
http://www.swob.dna.fi/~maxxon/ | hateme.html |