Forum Discussion
Craig_Freyman_1
Nimbostratus
Oct 17, 2005NO-Caching certain files with BIP
Trying to write an IRule to make client computers not cache certain file types. We can not have our client computers download any files that start with "slide" or "ps" into their temporary internet f...
Colin_Walker_12
Oct 17, 2005Historic F5 Account
Well, first I'd recommend a few tweaks to the rule to make it A.) more efficient, and B.) more effective.
I'd use something closer to this:
when HTTP_REQUEST {
set foundmatch 0
if { ([HTTP::uri] contains "slide") or ([HTTP::uri] contains "ps") } {
set foundmatch 1
}
}
when HTTP_RESPONSE {
if {$foundmatch == 1} {
HTTP::header replace Cache-Control no-cache
HTTP::header replace Pragma no-cache
}
}
One of the problems this solves is that, in your original example, if the uri contained slide., but not ps., foundmatch would have been set to 0, due to the if/else structure you had in place. This should resolve that, as well as run a bit more smoothly.
Even with these headers set to no-cache, though, I'm not sure that you'll be able to completely stop the downoading of files into the Temporary Internet Files folder, even if that is how it's supposed to behave.
Let us know if you see any improvement or have any other questions.
-Colin
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