Forum Discussion
Maintenance page Caching issue
We are trying to create a simple iRule Maintenance page to call a iFile when the pool members are down. The code we have works but when the site becomes available it doesn't load without clearing browser cache. I thought the Cache-Control commands would fix this but it doesn't. I have read in other DevCentral articles to make sure the its not HTTP 1.0, from an HTTPWatch Capture the traffic is HTTP 1.1. Does anyone have any suggestions to fix our issue.
when HTTP_REQUEST { if { [active_members [LB::server pool]] == 0 } { HTTP::respond 200 content "[ifile get LNS_Sorry.JPG ]" noserver "Cache-Control" "no-store, no-cache" } }
2 Replies
- Hannes_Rapp
Nimbostratus
I don't think retained cache is your problem. Quite sure that if you just close the browser, and re-open, without clearing cache and browser data, your site will load too. Personally I'm not a fan of F5-served HTTP 200 maintenance pages (prefer 302 to ext pages), but you can pull it off.
You will need to add
header to make sure client tears down the existing TCP connection when a static F5-served response page is received.Connection Closewhen HTTP_REQUEST { if { [active_members [LB::server pool]] == 0 }{ HTTP::respond 200 content "[ifile get LNS_Sorry.JPG ]" noserver Cache-Control no-cache Connection Close } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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