Which iRule will instruct the client's browser to avoid caching HTML server responses?
Which iRule will instruct the client's browser to avoid caching HTML server responses?
The iRule that will instruct the client's browser to avoid caching HTML server responses must modify the HTTP response headers and not the request headers. Therefore, the correct event to use is `HTTP_RESPONSE`. Additionally, it is important to check if the `Content-Type` contains 'html' to apply the cache control policy. Thus, the correct iRule is: when HTTP_RESPONSE { if {[HTTP::header Content-Type] contains "html"} { HTTP::header insert Pragma "no-cache" HTTP::header insert Expires "Fri, 01 Jan 1990 00:00:00 GMT" HTTP::header replace Cache-Control "no-cache,no-store,must-revalidate" } }.
C - Correct https://community.f5.com/discussions/technicalforum/force-no-cache-on-a-response-for-naughty-browsers/157583