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:
- Go to
Tools -> Internet Options
- Click the
Advanced
tab - Under the
Security
section, checkDo not save encrypted pages to disk
- 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.