[thelist] Playing with MIME type (was: Downloading .jpg & .pdf files)

Joe Crawford jcrawford at avencom.com
Mon May 21 13:34:13 CDT 2001


deke wrote:
> This isn't something you do in HTML, this is something you do in
> server configuration. When the browser sees a MIME type it doesn't
> recognize, it asks the user where to save the file, rather than trying
> to open it.
> 
> With an NCSA-compatible server like Apache, you simply put a files
> in a special download-only directory, and stick an .htaccess file in
> that directory for each file type:
>     AddType application/octet-stream jpg
>     AddType application/octet-stream pdf
> 
> Since the application/octet-stream MIME type is simply a stream of
> 8-bit data of unknown use, there aren't going to be any applications
> set up to open it. If you want to have fun, you can use
>     AddType application/evolt-download-only jpg
>     AddType application/evolt-download-only pdf
> or even
>     AddType be/mine jpg
>     AddType true/love pdf

Is this going to work on IE/Windows? It's my understanding that IE makes
guesses about files with strange MIME types based on the extension. Have
you used this successfully? It's an interesting and clever shorthand  (I
like!) - but does it work to bring up the "prompt to save" box for most
browsers in a reliable way? And does doing it this way impact Macintosh?
It seems like feeding an unknown mime type might make it unviewable (to
most users) on the Mac side.

TIA,
	Joe <http://artlung.com/>
--
Joe Crawford ||||||||||||||       mailto:jcrawford at avencom.com
||||||||||||||||||||||||             http://www.avencom.com
|||||||||||||||||||||||||||      Avencom: Set Your Sites Higher




More information about the thelist mailing list