Downloading files over SSL with IE7

Problem

I have a script, call it download.php, that pulls files from a database and serves them up to the user. For example, download.php?fileId=69 might return some headers and data that cause the user’s browser to download a PDF and prompt the user if they want to open it in Acrobat or something.

This works fine in Opera and Firefox, but when dealing with IE7 over SSL, the browser throws an error message saying that it can’t download the file download.php. I tried playing with various header() calls, but eventually wound up with a solution that is “good enough”.

Solution

In IE7, do the following:

  1. Go to Tools -> Internet Options
  2. Click the Advanced tab
  3. Under the Security section, check Do not save encrypted pages to disk
  4. Click the Apply button

And there you go. For me this is fine because I’ve convinced most of my users to use Firefox. If you have a large userbase that is still using IE, then telling each one to muck around in their browser settings might not be the cleanest solution.

This entry was posted in HOW-TOs, Micro$oft. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *