views:

58

answers:

3

So, I recently found this little gem.

http://support.microsoft.com/kb/323308

Essentially, IE doesn't haven't Cache-Control: no-cache properly over HTTPs, which breaks the download. However, I need to disable caching for a number of responses across my application which hit the same IO write path, which I can easily control.

Is there a way to get around this issue so that I can force no-caching in IE over HTTPS using nothing but response headers? It's unrealistic to expect my users to do a registry change to fix the broken behavior of IE.

A: 

I just do this to clear out the cache headers set by the web container and it has worked fine

response.reset(); //workaround IE restriction against streaming to cache from SSL
response.setContentType("myMIMEType");
response.setHeader("Content-Disposition", "attachment; filename=\"" + whateverGoesHere + "\"");

Then send the file to output stream. Obviously if you want it rendered inside the browser window rather than a file save dialog, you wouldn't put do the attachment; disposition type.

Affe
Should this somehow prevent caching, or allow Cache-Control to not cause absolute breakage? I'm trying both now.
Stefan Kendall
A: 

Try using:

Pragma: no-cache

From the HTTP Spec

Michael Barker
This exhibits the same breakage.
Stefan Kendall
+1  A: 

There is no good solution. You can try adding the timestamp to your requests, though.

Stefan Kendall
I use this method for ajax in ie as it caches the request!!
jimplode