in reply to downloading files, different browsers

I recall getting bit by that bug a while back. I never worked out how to detect the minor version number in the browser to make things automated; I put up two links and let the user decide if they had IE 5.51.

I seem to recall that there was some JavaScript that you could use to detect IE minor versions, but I never tried it. The difference was, for IE 5.51 do this . .

print "Content-Disposition: filename=$filename\n\n";
instead of this.
print "Content-disposition: attachment; filename=$filename\n\n +";
after the Content-Type line.

Microsoft acknowledges the bug. . . how nice.

And I just remembered one last quirk. By not being able to use "attachment" IE 5.51 reads the first few bytes of a file to determine it's type (it ignores your Content-Type MIME Header!) and if it recognizes say MS-Word or MS-Excel it would open the file in the browser instead of generating a "save as" dialog. However, if the user does a file->save from the menu it will have the right name.

Replies are listed 'Best First'.
Re: Re: downloading files, different browsers
by Dufonzo (Initiate) on Feb 21, 2003 at 14:45 UTC
    Groovy baby.
    Now I have this working in most of the browsers that my target users will be using.

    Thanks,

    Thanks to all for their input.

    - D