This bug was corrected in Internet Explorer 5.
- Open this file from its current location
- Save this file to disk
When a file is returned to the Explorer with a Content-Disposition header with type "attachment," Explorer should prompt the user regardless of the above selection. In fact, Explorer may not always prompt the user.
Internet Explorer 4.01 does support the Content-Disposition header in that it will initialize the File Download dialog box (if it does appear) with a suggested file name. The following code demonstrates how to send the Content-Disposition header and a suggested file name from a CGI program:
char szContentType="Content-Type: bad/type\r\nContent-Disposition:"
" attachment; filename=name.xxx\r\n\r\n";
printf("This is a test.");
You might think that setting the Content-Type to a type unknown to Explorer would force the File Download dialog box. In fact, the Explorer "sniffs" the data sent from the server and detects the type of file being sent. If it recognizes the file type, it will behave according to the user preference. At this point, there is no completely reliable way to force the File Download dialog box to appear when downloading a file to Internet Explorer.
Article ID: 182315 - Last Review: Nov 13, 2012 - Revision: 1