Forum Discussion
Korai_331784
Altostratus
Jun 08, 2018HTTP Header Cache Control
Hi,
I have below HTTP header irule script , we have Caching issue as when we move site from maintenance page to live site still but still maintenance page exists which we think its because of ca...
JG
Cumulonimbus
Jun 08, 2018This is what I use:
when HTTP_REQUEST {
set mytime [clock seconds]
set last_modified "[clock format $mytime -format {%a, %d %b %Y %T %Z} -gmt 1]"
set cache_control_1 "no-store, no-cache, must-revalidate, max-age=0"
set cache_control_2 "post-check=0, pre-check=0, false"
set pragma "no-cache"
HTTP::respond 503 content {
Service Outage Notice
This service is currently under maintenance.
} "Content-Type" "text/html" "Last-Modified" $last_modified "Cache-Control" $cache_control_1 "Cache-Control" $cache_control_2 "Pragma" $pragma Connection close
}
.
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