Re: Downloading Files

by "Peter Veenhof" <peter(at)veenhof.com>

 Date:  Wed, 21 Jun 2000 11:27:18 -0400
 To:  <hwg-basics(at)hwg.org>
  todo: View Thread, Original
Yes but don't confuse him too much, you should really never have to worry
about this... If you have .JPG, .AVI and .ZIP files that are simply flat
HTML files then you have a lot more problems on your hands than worrying
about downloading files from the internet :) I don't think I've ever seen
this in the "real" world. Saving is always a right click away. You pointed
out a good problem with MSIE, but you offer no solution, does anyone have a
solution to get around this? I can't see any other way than just doing a
direct link to a file to make in downloadable.. Unless of course you want to
code some special scripts in whatever language or  if you have access to a
public FTP you could probably make use of the easier.

Pete

----- Original Message -----
From: Jim Tom Polk <jtpolk(at)texas.net>
To: <hwg-basics(at)mail.hwg.org>
Sent: Wednesday, June 21, 2000 12:42 AM
Subject: Re: Downloading Files


> The browsers take care of this internally, the HTML page just contains a
> standard link to the file to be downloaded.

Actually, they are supposed to respect the Web Servers mime types, which
some browsers do not respect.

Case in point: let us say that you have a file with a *.txt ending. It
should show up as a text file, right??

In Netscape, which uses mime-types as set by the web server, it does,
even if the text is nothing but HTML. It shows the HTML as text, as
specified. If there is no specification, then the file is downloaded as
''text/plain''.

In MSIE, it does not matter, if it sees that the file ''looks'' like
HTML, then no matter what, it by golly it going to download the file and
display that text as HTML!!!

The stupidity of this can be seen in the following:

http://camalott.com/~jtpolk/mimer.txt
Content-Type: text/plain

http://camalott.com/~jtpolk/mimer.jpg
Content-Type: image/jpeg

http://camalott.com/~jtpolk/mimer.avi
Content-Type: video/x-msvideo

http://camalott.com/~jtpolk/mimer.zip
Content-Type: application/zip

the Content-Type is what the web server, based on the file extension,
based on how it is set up, sends to the browser saying: this file is of
this type, and here is how it should be displayed.

These are all the same file, mimer.html (check it out).

No matter what, MSIE is determined that no matter what it is told (these
are actually published standards), the file is text/html and it will
only show it as that. In this case, it guess correctly, but there have
been times!!!



--


Jim Tom Polk -:- jtpolk(at)texas.net -:- http://camalott.com/~jtpolk/
''You might as well fall flat on your face as
  lean over too far backwards.''      --James Thurber--
   "The Universe is run by the complex interweaving of three
          elements: energy, matter and enlightened self-interest."
  - G'Kar  "Survivors"

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.