开发者

zip file link not download from IIS in internet explorer 8 but instead opens as gibberish

i have a .zip file sitting on an IIS 6 webserver.

i have an html file with a link to that zip file like this:

<a href="file.zip">Download File</a>

When you open the page and click the link in firefox or chrome, you get the Open or Save dialog box as expected.

When you do the same in Internet Explorer 8, you navigate to a new page that displays the "contents" of the zip file as text (unreadable characters). This happens on at least 3 machines that were tested.

Any idea why this would be happening in IE or what i need to do to fix it?

Changing IE settings is not an option since we do not control the settings of who goes to our site. Changing the HTML or javascript on the page with link 开发者_C百科is an option.

Thanks for the help!


You may need to set the MIME type of the file. To do so, go to IIS6 Manager for the website. Go to Properties for the site (right-click on the website name for Properties in the menu). Click the HTTP Headers tab. Click the MIME Types... button.

From there, you should be able to add .zip as an extension. I'm not entirely sure which MIME type will work best, but application/zip and application/x-zip are two options to try.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜