I found this odd problem with IE and uncached executable content. In my case, the executable content was a Macromedia Shockwave "flash" file.

I wanted to be able to update this file frequently as I developed it. (I also had some dynamic data files that would be changing in the same folder.) But "Refresh" on my browser (Internet Explorer 6) wouldn't refresh! **Grr!**

So I created a .htaccess file in the folder with this directive:

Header add Cache-Control: no-cache

That tells IE not to cache the file; it should reload it every time instead.

The problem was that once I did this, the file wouldn't load at all anymore. IE would open a "File download" warning box. I have a sample of it set up here (which may work fine on your browser, but it fails on my IE6 every time).

It told me "Some files can harm your computer." And it offered to let me "Open" or "Save" the file. I clicked open. It tried to open it. It failed.

I didn't realize the problem was my no-cache directive because I didn't really see the problem for some time after making that change.

So I went to Google. I looked all over the place. Finally I found a mention by NickyBoy on a php tech note. He said this:


The problems people mention about IE are actually a feature!
Microsoft Knowledge Base Article 316431 says:

In order for Internet Explorer to open documents in Office (or any out-of-process, ActiveX document server), Internet Explorer must save the file to the local cache directory and ask the associated application to load the file by using IPersistFile::Load. If the file is not stored to disk, this operation fails.

When Internet Explorer communicates with a secure Web site through SSL, Internet Explorer enforces any no-cache request. If the header or headers are present, Internet Explorer does not cache the file. Consequently, Office cannot open the file.
They say this applies to: Microsoft Internet Explorer 5.5 for Windows 2000
Microsoft Internet Explorer 5.01 for Windows 2000
Microsoft Internet Explorer version 6 for Windows 2000
not sure about other versions!

hth
nickyboy

That article actually blames an SSL feature. But I'm not doing any SSL, dang-it! I just have a regular page with "no-cache" turned on!

It took me a while to discover the exact header that was causing the problem ("no-cache") but when NickyBoy pointed it out, I switched to using an Expires headers instead.

ExpiresActive on
ExpiresDefault "now plus 10 seconds"
Header append Cache-Control: must-revalidate

This causes my file to get cached for at least 10 seconds, but later when I press F5 it gets reloaded.

The resulting header (for you non-Apache types) was this:

Cache-Control: must-revalidate, max-age=10
Expires: Fri, 26 Mar 2004 01:40:42 GMT

So, it sounds like NickyBoy was right (Kudos to you, Nicky!). My page had nothing to do with SSL, either. A regular old no-cache application data feeder. Dang!