Forum Discussion
Jeff_C_42204
Nimbostratus
Aug 01, 2007Irule to set expires headers for static conent
Hello Dev Central!
I have an IIS 6.0 server that is not setting the expires header (cache-control is set) which is causing a potential performance issue.
I would like to remedy th...
Jeff_C_42204
Nimbostratus
Aug 01, 2007I was trying to make things a little harder than they needed to be, here is an irule that works:
when HTTP_REQUEST {
set HTTP_URI [HTTP::uri]
}
when HTTP_RESPONSE {
if {[matchclass $HTTP_URI ends_with $::images]} {
HTTP::header insert Expires "[clock format [expr ([clock seconds]+86400)] -format "%a, %d %h %Y %T GMT" -gmt true]"
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
