[Please see update below for a proper fix]
Today I received an email from a client that had just moved their site over to SSL (i.e. HTTPS) — they were no longer able to download files in Internet Explorer. When they tried to do so, a message would appear:
Unable to download...[file name]
The file could not be written to the cache
(an alternative error message is “Internet Explorer cannot download [file name] from [site].
Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.”)
I tried various suggestions: different response headers, settings to do with saving encrypted files, and even tried (and failed) to install a couple of hotfixes.
In the end, I’d nearly given up when I found this knowledgebase article and decided to have a go at manually adding the BypassSSLNoCacheCheck registry key.
Short story, it worked. It’s not great since it requires the user to do something — I couldn’t fix it server-side — but it was OK in this case because the site was an intranet so their IT people could sort it. Anyway, I hope this helps someone else out there…
UPDATE: OK, after a lot more experimentation I found a proper solution that doesn’t involve registry updates!
It’s a long story but it turns out that PHP was automatically sending an extra header (“Pragma: no-cache”) that I hadn’t noticed. So, I set the headers as follows:
header( "Pragma: private" );
…which overrides the automated headers and appears to solve the problem. Hurray!