Forum Discussion
Chad_Roberts_21
Nimbostratus
Jan 08, 2007Problems downloading files with CACHE-CONTROL header
I asked this in response to a previous thread, but my question went unnoticed... I'll try again here.
I recently tried adding the following simple iRule to one of our web apps. It seemed to work well at first, but problems arose:
when HTTP_RESPONSE {
HTTP::header insert "PRAGMA" "NO-CACHE"
HTTP::header insert "CACHE-CONTROL" "NO-CACHE"
}
It works great for the most part... until a user attempts to download a file in IE. I've found a number of sites that talk about problems when downloading files in IE when the CACHE-CONTROL header is present, but I find it hard to believe that this long into the existence of IE it's still just a fact that IE, downloads, and that header cannot ever co-exist. Has anyone else ever run into this? I've also tried adding HTTP::version "1.1" but didn't see improvement.
When a user attempts to download a file, the error is something like this:Internet Explorer cannot download [file] from [server host name].
Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.
Any ideas?
- hoolio
Cirrostratus
Hey DBW, - Chad_Roberts_21
Nimbostratus
I'm looking in both routes, but the problem is that while Microsoft does have some documentation on the subject, like the example you gave above, every article of their own that I've come across has been specific to a certain type of scenario. Worse yet, the resolution to each is a patch or specific fix of some kind on the browser side. Because we are a financial institution and the application is for customers, we cannot enforce a requirement that all users using IE (90% or more, no doubt) must install a patch not required by Microsoft in critical updates. In other words, this failure will occur 100% of the time with users running IE browsers unless they install a specific patch, and of course I can't place such a requirement on all of our customers. - Andrew_Vishnyak
Nimbostratus
Found the same problem with PDF, XLS and Java Web Start (JNLP) files.when HTTP_RESPONSE { if { [HTTP::header "Content-Type"] contains "application" } { HTTP::version "1.0" } }
- Simon_Wright_85
Nimbostratus
I am having the same problem with these kind of downloads. I have changed the response from http1.1 to http1.0 but also needed to change the content-type as well on some requests before it would work using the above irule. - Perry_71428
Nimbostratus
Hiwhen HTTP_RESPONSE { Remove all Cache-Control related headers Solves issue in IE when downloading over https fails HTTP::header remove Cache-Control HTTP::header remove Expires HTTP::header remove Pragma }
- Fabrizio_Chiava
Nimbostratus
Hi Perry,
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects