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
To answer your question, yes, the contains operator matches the compared text anywhere in the variable you're referencing. It is not, by default, case insensitive, though. For that, you'd need to use the tolower command.
when HTTP_REQUEST {
set foundmatch 0
if { [string tolower [HTTP::uri] ] contains "openmeetingversioncheck.swf" } {
set foundmatch 1
}
}
when HTTP_RESPONSE {
if {$foundmatch == 1} {
HTTP::header replace Cache-Control no-cache
HTTP::header replace Pragma no-cache
}
}
I'm not convinced this is your problem, though. Have you confirmed yet whether or not the headers are being replaced?
If you do a tcpdump on the interface that's sending the traffic back to the client, or on the client machine itself, you should be able to see whether or not the headers you're trying to modify are being replaced or not.
If they are, and you're still having an issue with the files being cached, then you'll likely need to research what else needs to be done to prevent this, if it's possible.
-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