NOTE: This only applies to Internet Explorer 6 with XP SP2 and later.
Once in a while you would like to become a tyrant when it comes to what your site’s visitors can do with the content, file links in particular.
OK, not a tyrant per se, but you want to limit operations for some file types.
- Can user open a file from IE after download?
- Can user save a file from IE after download?
“Why would I want to do that?” – you may ask.
There is a small example for you:
Opening of CSV file in Excel and saving it after would actually adjust file structure since Excel treats some of the values differently which otherwise present in the CSV file. 0 (zero) may be converted and saved as an empty space, etc.
What can you do?
Remember, IE saves a temporary copy of the file in TEMP location and then open it from there. Your visitor may not be to comfortable looking for the file in some “strange” places. So, to avoid situation above you just have to be that “tyrant” and not allow opening a file without saving it first in proper place.
To Hide “Open” button in “File Download” dialog place the following META tag into your page header:
<head> <meta name="DownloadOptions" content="noopen" /> </head>
Similarly you can hide “Save” button
<head> <meta name="DownloadOptions" content="nosave" /> </head>
Note: This option may not work properly within IFRAME element.