Forum Discussion

jokragly's avatar
jokragly
Icon for Nimbostratus rankNimbostratus
Jan 16, 2017

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

  • 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

    Connection Close
    header to make sure client tears down the existing TCP connection when a static F5-served response page is received.

    when 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
        }
    }